当前位置: 首页>>代码示例>>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;未经允许,请勿转载。