本文整理汇总了PHP中CAdminNotify::add方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminNotify::add方法的具体用法?PHP CAdminNotify::add怎么用?PHP CAdminNotify::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminNotify
的用法示例。
在下文中一共展示了CAdminNotify::add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InstallDB
function InstallDB($install_wizard = true)
{
global $DB, $DBType, $APPLICATION;
$errors = null;
if (!$DB->Query("SELECT 'x' FROM b_disk_storage", true)) {
$errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/install/db/" . $DBType . "/install.sql");
}
$this->InstallTasks();
if (!empty($errors)) {
$APPLICATION->ThrowException(implode("", $errors));
return false;
}
$isWebdavInstalled = isModuleInstalled('webdav');
$this->RegisterModuleDependences(!$isWebdavInstalled);
RegisterModule("disk");
$this->InstallUserFields();
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
CAgent::addAgent('\\Bitrix\\Disk\\ExternalLink::removeExpiredWithTypeAuto();', 'disk', 'N');
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
CAgent::addAgent('\\Bitrix\\Disk\\Bitrix24Disk\\UploadFileManager::removeIrrelevant();', 'disk', 'N');
if (!$isWebdavInstalled) {
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/disk/lib/configuration.php";
\Bitrix\Main\Config\Option::set('disk', 'successfully_converted', 'Y');
\Bitrix\Main\Config\Option::set('disk', 'disk_revision_api', \Bitrix\Disk\Configuration::REVISION_API);
} else {
\CAdminNotify::add(array("MESSAGE" => Loc::getMessage("DISK_NOTIFY_MIGRATE_WEBDAV", array("#LINK#" => "/bitrix/admin/disk_from_webdav_convertor.php?lang=" . \Bitrix\Main\Application::getInstance()->getContext()->getLanguage())), "TAG" => "disk_migrate_from_webdav", "MODULE_ID" => "disk", "ENABLE_CLOSE" => "N"));
}
return true;
}
示例2: checkAdminNotification
/**
* Adds admin users notification about index rebuild.
*
* @param boolean $force Whenever skip iblock check.
*
* @return void
*/
public static function checkAdminNotification($force = false)
{
if ($force) {
$add = true;
} else {
$iblockList = \Bitrix\Iblock\IblockTable::getList(array('select' => array('ID'), 'filter' => array('=PROPERTY_INDEX' => 'I')));
$add = $iblockList->fetch() ? true : false;
}
if ($add) {
$notifyList = \CAdminNotify::getList(array(), array("TAG" => "iblock_property_reindex"));
if (!$notifyList->fetch()) {
\CAdminNotify::add(array("MESSAGE" => Loc::getMessage("IBLOCK_NOTIFY_PROPERTY_REINDEX", array("#LINK#" => "/bitrix/admin/iblock_reindex.php?lang=" . \Bitrix\Main\Application::getInstance()->getContext()->getLanguage())), "TAG" => "iblock_property_reindex", "MODULE_ID" => "iblock", "ENABLE_CLOSE" => "Y", "PUBLIC_SECTION" => "N"));
}
} else {
\CAdminNotify::deleteByTag("iblock_property_reindex");
}
}