• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/template.php
  • Класс: BitrixBizprocAutomationEngineTemplate
  • Вызов: Template::getProperty
public function getProperty($object, $field): ?array
{
	switch ($object)
	{
		case 'Template':
			return $this->template['PARAMETERS'][$field] ?? null;
		case 'Variable':
			return $this->template['VARIABLES'][$field] ?? null;
		case 'Constant':
			return $this->template['CONSTANTS'][$field] ?? null;
		case 'GlobalConst':
			return BizprocWorkflowTypeGlobalConst::getVisibleById($field, $this->getDocumentType());
		case 'GlobalVar':
			return BizprocWorkflowTypeGlobalVar::getVisibleById($field, $this->getDocumentType());
		case 'Document':
			static $fields;
			if (!$fields)
			{
				$documentService = CBPRuntime::GetRuntime(true)->getDocumentService();
				$fields = $documentService->GetDocumentFields($this->getDocumentType());
			}

			return $fields[$field] ?? null;
		default:
			if ($this->isConverted)
			{
				return $this->findRobotProperty($object, $field);
			}
			else
			{
				return $this->findActivityProperty($object, $field);
			}
	}
}