• Модуль: rpa
  • Путь к файлу: ~/bitrix/modules/rpa/lib/components/itemdetail.php
  • Класс: BitrixRpaComponentsItemDetail
  • Вызов: ItemDetail::saveAction
public function saveAction(array $data, string $eventId = ''): ?array
{
	$this->init();
	if($this->getErrors())
	{
		return null;
	}

	if(empty($data))
	{
		$this->errorCollection[] = new Error('No data');
		return null;
	}

	$this->processData($data);
	$command = $this->getCommand();
	if(!empty($eventId) && is_string($eventId))
	{
		$command->setPullEventId($eventId);
	}
	$this->prepareCommand($command);

	$result = $command->run();
	if($result->isSuccess())
	{
		$this->item = $command->getItem();
	}

	return $this->prepareEditorResult($result);
}