• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/template.php
  • Класс: BitrixBizprocAutomationEngineTemplate
  • Вызов: Template::toArray
public function toArray()
{
	$result = [
		'ID' => $this->getId(),
		'DOCUMENT_TYPE' => $this->getDocumentType(),
		'DOCUMENT_STATUS' => $this->template['DOCUMENT_STATUS'],
		'PARAMETERS' => $this->template['PARAMETERS'],
		'CONSTANTS' => $this->template['CONSTANTS'],
		'VARIABLES' => $this->template['VARIABLES'] ?? [],
	];

	$result['IS_EXTERNAL_MODIFIED'] = $this->isExternalModified();
	$result['ROBOTS'] = array();

	foreach ($this->getRobots() as $robot)
	{
		$result['ROBOTS'][] = $robot->toArray();
	}

	return $result;
}