- Модуль: documentgenerator
- Путь к файлу: ~/bitrix/modules/documentgenerator/lib/controller/template.php
- Класс: BitrixDocumentGeneratorControllerTemplate
- Вызов: Template::getAction
public function getAction(BitrixDocumentGeneratorTemplate $template, CRestServer $restServer = null)
{
return [
'template' => [
'id' => $template->ID,
'name' => $template->NAME,
'region' => $template->REGION,
'code' => $template->CODE,
'download' => $template->getDownloadUrl(true),
'active' => $template->ACTIVE,
'moduleId' => $template->MODULE_ID,
'numeratorId' => $template->NUMERATOR_ID,
'withStamps' => $template->WITH_STAMPS,
'providers' => $template->getDataProviders(),
'users' => $template->getUsers(),
'isDeleted' => $template->isDeleted() ? 'Y' : 'N',
'sort' => $template->SORT,
'createTime' => $template->CREATE_TIME,
'updateTime' => $template->UPDATE_TIME,
],
];
}