• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Workflow/Workflow.php
  • Класс: Bitrix\Crm\Workflow\Workflow
  • Вызов: Workflow::getStages
function getStages(): array;

/**
 * Returns initial entity stage
 * @return string
 */
public abstract function getInitialStage(): string;

/**
 * Returns current entity identifier
 * @return int
 */
public abstract function getEntityId(): int;

/**
 * Fetches current stage from database
 * @return string
 */
public function getStage(): string
{
	$currentStage = EntityStageTable::getStage($this->getEntityId(), static::getWorkflowCode());
	return $currentStage ?? $this->getInitialStage();
}