- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/section.php
- Класс: BitrixCalendarCoreMappersSection
- Вызов: Section::convertToArray
private function convertToArray(CoreSectionSection $section): array
{
return [
'NAME' => $section->getName(),
'ACTIVE' => $section->isActive() ? self::POSITIVE_ANSWER : self::NEGATIVE_ANSWER,
'DESCRIPTION' => $section->getDescription(),
'COLOR' => $section->getColor(),
'TEXT_COLOR' => $section->getTextColor(),
'SORT' => $section->getSort() ?? self::DEFAULT_SORT,
'CAL_TYPE' => $section->getType(),
'OWNER_ID' => !$section->getOwner() ?: $section->getOwner()->getId(),
'TIMESTAMP_X' => new DateTime,
'XML_ID' => $section->getXmlId(),
'EXTERNAL_ID' => $section->getExternalId(),
'GAPI_CALENDAR_ID' => $section->getGoogleId(),
'EXPORT' => $section->getExport(),
'CREATED_BY' => !$section->getCreator() ?: $section->getCreator()->getId(),
'PARENT_ID' => $section->getParentId(),
'DATE_CREATE' => new DateTime,
'DAV_EXCH_CAL' => $section->getDavExchangeCal(),
'DAV_EXCH_MOD' => $section->getDavExchangeMod(),
'CAL_DAV_CON' => $section->getCalDavConnectionId(),
'CAL_DAV_CAL' => $section->getCalDavCal(),
'CAL_DAV_MOD' => $section->getCalDavMod(),
'IS_EXCHANGE' => $section->isExchange() ? 1 : 0,
'SYNC_TOKEN' => $section->getSyncToken(),
'EXTERNAL_TYPE' => $section->getExternalType(),
'PAGE_TOKEN' => $section->getPageToken(),
];
}