• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/integration/controller/base.php
  • Класс: BitrixRestIntegrationControllerBase
  • Вызов: Base::processBeforeAction
protected function processBeforeAction(EngineAction $action)
{
	$r = $this->checkPermission($action->getName(), $action->getArguments());

	if($r->isSuccess())
	{
		$internalizer = new Internalizer(
			$this->getViewManager()
		);

		$r = $internalizer->process();

		if($r->isSuccess())
		{
			$action->setArguments($r->getData()['data']);
			return parent::processBeforeAction($action);
		}
		else
		{
			$this->addErrors($r->getErrors());
			return null;
		}
	}
	else
	{
		$this->addErrors($r->getErrors());
		return null;
	}
}