• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/admin_notify.php
  • Класс: CAdminNotify
  • Вызов: CAdminNotify::CheckFields
static function CheckFields($arFields)
{
	$aMsg = [];

	if (is_set($arFields, 'MODULE_ID') && trim($arFields['MODULE_ID']) == '')
	{
		$aMsg[] = ['id' => 'MODULE_ID', 'text' => GetMessage('MAIN_AN_ERROR_MODULE_ID')];
	}
	if (is_set($arFields, 'TAG') && trim($arFields['TAG']) == '')
	{
		$aMsg[] = ['id' => 'TAG', 'text' => GetMessage('MAIN_AN_ERROR_TAG')];
	}
	if (!is_set($arFields, 'MESSAGE') || trim($arFields['MESSAGE']) == '')
	{
		$aMsg[] = ['id' => 'MESSAGE', 'text' => GetMessage('MAIN_AN_ERROR_MESSAGE')];
	}
	if (is_set($arFields, 'ENABLE_CLOSE') && !($arFields['ENABLE_CLOSE'] == 'Y' || $arFields['ENABLE_CLOSE'] == 'N'))
	{
		$aMsg[] = ['id' => 'ENABLE_CLOSE', 'text' => GetMessage('MAIN_AN_ERROR_ENABLE_CLOSE')];
	}

	if (!empty($aMsg))
	{
		$e = new CAdminException($aMsg);
		$GLOBALS['APPLICATION']->ThrowException($e);
		return false;
	}

	return true;
}