當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CAdminNotify::add方法代碼示例

本文整理匯總了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;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:29,代碼來源:index.php

示例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");
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:24,代碼來源:manager.php


注:本文中的CAdminNotify::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。