- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/template.php
- Класс: BitrixBizprocAutomationEngineTemplate
- Вызов: Template::__construct
public function __construct(array $documentType, $documentStatus = null)
{
$this->template = array(
'ID' => 0,
'MODULE_ID' => $documentType[0],
'ENTITY' => $documentType[1],
'DOCUMENT_TYPE' => $documentType[2],
'DOCUMENT_STATUS' => $documentStatus,
'AUTO_EXECUTE' => $this->autoExecuteType,
'TEMPLATE' => [],
'PARAMETERS' => [],
'CONSTANTS' => [],
'VARIABLES' => [],
);
if ($documentStatus)
{
$row = WorkflowTemplateTable::getList([
'filter' => [
'=MODULE_ID' => $documentType[0],
'=ENTITY' => $documentType[1],
'=DOCUMENT_TYPE' => $documentType[2],
'=DOCUMENT_STATUS' => $documentStatus,
//'=AUTO_EXECUTE' => $this->autoExecuteType
],
])->fetch();
if ($row)
{
$this->template = $row;
$this->autoExecuteType = (int) $this->template['AUTO_EXECUTE'];
}
}
}