• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/template.php
  • Класс: BitrixBizprocAutomationEngineTemplate
  • Вызов: Template::deleteRobots
public function deleteRobots(array $robots, int $userId): Result
{
	$isSameRobot = function ($lhsRobot, $rhsRobot) {
		return strcmp($lhsRobot->getName(), $rhsRobot->getName());
	};

	$remainingRobots = array_udiff($this->getRobots(), $robots, $isSameRobot);

	return $this->save($remainingRobots, $userId);
}