• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/taskwebservice.php
  • Класс: CTasksWebService
  • Вызов: CTasksWebService::GetList
function GetList($listName)
{
	if (!$this->__Init())
		return $this->error;

	if (!$listName_original = CIntranetUtils::checkGUID($listName))
	{
		return new CSoapFault(
				'Data error',
				'Wrong GUID - '.$listName
		);
	}

	$listName = ToUpper(CIntranetUtils::makeGUID($listName_original));

	$data = new CXMLCreator('List');
	$data->setAttribute('ID', $listName);
	$data->setAttribute('Name', $listName);

	$data->setAttribute('Direction', 'none'); // RTL, LTR

	$data->setAttribute('ReadSecurity', '2');
	$data->setAttribute('WriteSecurity', '2');

	$data->setAttribute('EnableAttachments', 'TRUE');

	$data->setAttribute('Author', $this->__makeUser(BitrixTasksUtilUser::getId()));

	$data->addChild($this->__getFieldsDefinition());

	$data->addChild($obNode = new CXMLCreator('RegionalSettings'));

	$obNode->addChild(CXMLCreator::createTagAttributed('Language', '1049'));
	$obNode->addChild(CXMLCreator::createTagAttributed('Locale', '1049'));
	$obNode->addChild(CXMLCreator::createTagAttributed('SortOrder', '1026'));
	$obNode->addChild(CXMLCreator::createTagAttributed('TimeZone', CIntranetUtils::getOutlookTimeZone()));
	$obNode->addChild(CXMLCreator::createTagAttributed('AdvanceHijri', '0'));
	$obNode->addChild(CXMLCreator::createTagAttributed('CalendarType', '1'));
	$obNode->addChild(CXMLCreator::createTagAttributed('Time24', 'True'));
	$obNode->addChild(CXMLCreator::createTagAttributed('Presence', 'True'));

	$data->addChild($obNode = new CXMLCreator('ServerSettings'));

	$obNode->addChild(CXMLCreator::createTagAttributed('ServerVersion', '12.0.0.0'));
	$obNode->addChild(CXMLCreator::createTagAttributed('RecycleBinEnabled', 'False'));
	$obNode->addChild(CXMLCreator::createTagAttributed('ServerRelativeUrl', '/company/personal/'));

	return array('GetListResult' => $data);
}