• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/controller/export.php
  • Класс: BitrixMainControllerExport
  • Вызов: Export::checkCommonErrors
protected function checkCommonErrors($action)
{
	if (empty($this->module))
	{
		$this->addError(new Error('Module Id property is not filled.'));
	}
	if (!MainLoader::includeModule($this->module))
	{
		$this->addError(new Error('Module '.$this->module.' is not included.'));
	}

	if ($this->isBitrix24)
	{
		if ($this->isCloudAvailable !== true)
		{
			$this->addError(new Error(Loc::getMessage('MAIN_EXPORT_ERROR_NO_CLOUD_BUCKET')));
		}
	}

	if ($action->getName() === self::ACTION_PURGE)
	{
		return true;
	}

	if ($this->componentName === '')
	{
		$this->addError(new Error('Component name is not specified.'));
	}
	if (!in_array($this->exportType, array(self::EXPORT_TYPE_CSV, self::EXPORT_TYPE_EXCEL), true))
	{
		$this->addError(new Error('The export type is not supported.'));
	}

	if($this->processToken === '')
	{
		$this->addError(new Error('Process token is not specified.'));
	}

	return empty($this->getErrors());
}