• Модуль: catalogmobile
  • Путь к файлу: ~/bitrix/modules/catalogmobile/lib/Controller/StoreDocumentDetails.php
  • Класс: Bitrix\CatalogMobile\Controller\StoreDocumentDetails
  • Вызов: StoreDocumentDetails::conductAction
public function conductAction(int $entityId): ?array
{
	if (!$this->checkDocumentConductRights($entityId))
	{
		$this->addError(new Error(Loc::getMessage('MOBILE_CONTROLLER_CATALOG_DETAILS_ERROR_CONDUCT_PERMS')));

		return null;
	}

	if (!$entityId)
	{
		$this->addError(new Error(Loc::getMessage('MOBILE_CONTROLLER_CATALOG_DETAILS_ERROR_NOT_FOUND')));

		return null;
	}

	$command = new ConductDocumentCommand($entityId, (int)$this->getCurrentUser()->getId());
	$result = $command();

	if (!$result->isSuccess())
	{
		$this->addErrors($result->getErrors());
		return null;
	}

	return [
		'load' => $this->createLoadResponse(),
	];
}