Метод getDocumentStates

public static

Сигнатура метода

public static function getDocumentStates($documentType, $documentId = null)

Описание

Method returns array of workflow templates and states for specified document. If document id is set method returns array of running and terminated workflow states and also templates which started on document edit action. If document id is not set method returns array of templates which started on document add. Return array example: array( workflow_id_or_template_id => array( "ID" => workflow_id, "TEMPLATE_ID" => template_id, "TEMPLATE_NAME" => template_name, "TEMPLATE_DESCRIPTION" => template_description, "TEMPLATE_PARAMETERS" => template_parameters, "STATE_NAME" => current_state_name, "STATE_TITLE" => current_state_title, "STATE_MODIFIED" => state_modified_datetime, "STATE_PARAMETERS" => state_parameters, "STATE_PERMISSIONS" => state_permissions, "WORKFLOW_STATUS" => workflow_status, ), . . . ) TEMPLATE_PARAMETERS example: array( "param1" => array( "Name" => "Parameter 1", "Description" => "", "Type" => "int", "Required" => true, "Multiple" => false, "Default" => 8, "Options" => null, ), "param2" => array( "Name" => "Parameter 2", "Description" => "", "Type" => "select", "Required" => false, "Multiple" => true, "Default" => "v2", "Options" => array( "v1" => "V 1", "v2" => "V 2", "v3" => "V 3", . . . ), ), . . . ) STATE_PARAMETERS example: array( array( "NAME" => event_name, "TITLE" => event_title, "PERMISSION" => array('user_1') ), . . . ) STATE_PERMISSIONS example: array( operation => users_array, . . . )

Параметры

2
Имя Тип По умолчанию Флаги
$documentType — —
—
$documentId — null
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulesbizproc/classes/general/document.php
Расположение метода в файле
Строки 120–133

Исходный код

PHP