• Модуль: rpa
  • Путь к файлу: ~/bitrix/modules/rpa/lib/controller/item.php
  • Класс: BitrixRpaControllerItem
  • Вызов: Item::deleteAction
public function deleteAction(BitrixRpaModelType $type, $id): void
{
	$item = $type->getItem($id);
	if(!$item)
	{
		$this->addError(new Error('Item of type '.$type->getName().' with id '.$id.' is not found'));
		return;
	}
	$command = Driver::getInstance()->getFactory()->getDeleteCommand($item);
	$result = $command->run();
	if(!$result->isSuccess())
	{
		$this->addErrors($result->getErrors());
	}
}