当前位置: 首页>>代码示例>>PHP>>正文


PHP CJSCore::GetCoreMessagesScript方法代码示例

本文整理汇总了PHP中CJSCore::GetCoreMessagesScript方法的典型用法代码示例。如果您正苦于以下问题:PHP CJSCore::GetCoreMessagesScript方法的具体用法?PHP CJSCore::GetCoreMessagesScript怎么用?PHP CJSCore::GetCoreMessagesScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CJSCore的用法示例。


在下文中一共展示了CJSCore::GetCoreMessagesScript方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onBeforeEndBufferContent

 /**
  * OnBeforeEndBufferContent handler
  */
 public function onBeforeEndBufferContent()
 {
     global $APPLICATION;
     $frame = self::getInstance();
     $params = array();
     if ($frame->getUseAppCache()) {
         $manifest = \Bitrix\Main\Data\AppCacheManifest::getInstance();
         $params = $manifest->OnBeforeEndBufferContent();
         $params["CACHE_MODE"] = "APPCACHE";
         $params["PAGE_URL"] = \Bitrix\Main\Context::getCurrent()->getServer()->getRequestUri();
     } elseif ($frame->getUseHTMLCache()) {
         $staticHTMLCache = \Bitrix\Main\Data\StaticHtmlCache::getInstance();
         if ($staticHTMLCache->isCacheable()) {
             $params["CACHE_MODE"] = "HTMLCACHE";
             if (\Bitrix\Main\Config\Option::get("main", "~show_composite_banner", "Y") == "Y") {
                 $options = \CHTMLPagesCache::GetOptions();
                 $params["banner"] = array("url" => GetMessage("COMPOSITE_BANNER_URL"), "text" => GetMessage("COMPOSITE_BANNER_TEXT"), "bgcolor" => isset($options["BANNER_BGCOLOR"]) ? $options["BANNER_BGCOLOR"] : "", "style" => isset($options["BANNER_STYLE"]) ? $options["BANNER_STYLE"] : "");
             }
         } else {
             return;
         }
     }
     $params["storageBlocks"] = array();
     foreach ($frame->dynamicIDs as $id => $dynamicData) {
         if ($dynamicData["use_browser_storage"]) {
             $realId = isset($this->containers[$id]) ? $this->containers[$id] : "bxdynamic_" . $id;
             $params["storageBlocks"][] = $realId;
         }
     }
     $frame->injectedJS = $frame->getInjectedJs($params);
     $APPLICATION->AddHeadString($this->injectedJS["start"], false, "BEFORE_CSS");
     //When dynamic hit we'll throw spread cookies away
     if ($frame->getUseHTMLCache() && $staticHTMLCache->isCacheable()) {
         $APPLICATION->GetSpreadCookieHTML();
         \CJSCore::GetCoreMessagesScript();
     }
 }
开发者ID:spas-viktor,项目名称:books,代码行数:40,代码来源:frame.php

示例2: EndBufferContent

 public function EndBufferContent($content = "")
 {
     if ($this->buffer_man) {
         $this->auto_buffer_cleaned = true;
         return "";
     }
     Frame::checkAdminPanel();
     if (function_exists("getmoduleevents")) {
         foreach (GetModuleEvents("main", "OnBeforeEndBufferContent", true) as $arEvent) {
             ExecuteModuleEventEx($arEvent, array());
         }
     }
     $asset = Asset::getInstance();
     if (Frame::getUseAppCache()) {
         $asset->addString(CJSCore::GetCoreMessagesScript(), false, AssetLocation::AFTER_CSS, AssetMode::ALL);
     } else {
         $asset->addString(CJSCore::GetCoreMessagesScript(), false, AssetLocation::AFTER_CSS, AssetMode::STANDARD);
         $asset->addString(CJSCore::GetCoreMessagesScript(true), false, AssetLocation::AFTER_CSS, AssetMode::COMPOSITE);
     }
     $asset->addString($this->GetSpreadCookieHTML(), false, AssetLocation::AFTER_JS, AssetMode::STANDARD);
     if ($asset->canMoveJsToBody() && \CJSCore::IsCoreLoaded()) {
         $asset->addString(\CJSCore::GetInlineCoreJs(), false, AssetLocation::BEFORE_CSS, AssetMode::ALL);
     }
     if (is_object($GLOBALS["APPLICATION"])) {
         $cnt = count($this->buffer_content_type);
         for ($i = 0; $i < $cnt; $i++) {
             $this->buffer_content[$i * 2 + 1] = call_user_func_array($this->buffer_content_type[$i]["F"], $this->buffer_content_type[$i]["P"]);
         }
     }
     $composite = Frame::getInstance();
     $compositeContent = $composite->startBuffering($content);
     $content = implode("", $this->buffer_content) . $content;
     if (function_exists("getmoduleevents")) {
         foreach (GetModuleEvents("main", "OnEndBufferContent", true) as $arEvent) {
             ExecuteModuleEventEx($arEvent, array(&$content));
         }
     }
     $wasContentModified = $composite->endBuffering($content, $compositeContent);
     if (!$wasContentModified && $asset->canMoveJsToBody()) {
         $asset->moveJsToBody($content);
     }
     return $content;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:43,代码来源:main.php

示例3: EndBufferContent

 function EndBufferContent($content = "")
 {
     if ($this->buffer_man) {
         $this->auto_buffer_cleaned = true;
         return '';
     }
     if (function_exists("getmoduleevents")) {
         foreach (GetModuleEvents("main", "OnBeforeEndBufferContent", true) as $arEvent) {
             ExecuteModuleEventEx($arEvent, array());
         }
     }
     $this->AddLangJS(CJSCore::GetCoreMessagesScript());
     $this->AddAdditionalJS($this->GetSpreadCookieHTML());
     if (is_object($GLOBALS["APPLICATION"])) {
         $cnt = count($this->buffer_content_type);
         for ($i = 0; $i < $cnt; $i++) {
             $this->buffer_content[$i * 2 + 1] = call_user_func_array($this->buffer_content_type[$i]["F"], $this->buffer_content_type[$i]["P"]);
         }
     }
     $content = implode('', $this->buffer_content) . $content;
     if (function_exists("getmoduleevents")) {
         foreach (GetModuleEvents("main", "OnEndBufferContent", true) as $arEvent) {
             ExecuteModuleEventEx($arEvent, array(&$content));
         }
     }
     return $content;
 }
开发者ID:spas-viktor,项目名称:books,代码行数:27,代码来源:main.php


注:本文中的CJSCore::GetCoreMessagesScript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。