• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Operation.php
  • Класс: Bitrix\Crm\Service\Operation
  • Вызов: Operation::addAction
public function addAction(string $actionPlacement, Action $action, int $sort = self::DEFAULT_ACTION_SORT): self
{
	if (
		$actionPlacement !== static::ACTION_BEFORE_SAVE
		&& $actionPlacement !== static::ACTION_AFTER_SAVE
	)
	{
		throw new ArgumentOutOfRangeException('actionPlacement');
	}

	while (isset($this->actions[$actionPlacement][$sort]))
	{
		$sort++;
	}

	$this->actions[$actionPlacement][$sort] = $action;

	return $this;
}