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


PHP CJSCore::init方法代码示例

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


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

示例1: setEnable

 /**
  * Sets isEnable property value and attaches needed handlers
  *
  * @param bool $isEnabled
  */
 public static function setEnable($isEnabled = true)
 {
     if ($isEnabled && !self::$isEnabled) {
         self::$onBeforeHandleKey = AddEventHandler("main", "OnBeforeEndBufferContent", array(self::getInstance(), "OnBeforeEndBufferContent"));
         self::$onHandleKey = AddEventHandler("main", "OnEndBufferContent", array(self::getInstance(), "OnEndBufferContent"));
         self::$onRestartBufferHandleKey = AddEventHandler("main", "OnBeforeRestartBuffer", array(self::getInstance(), "OnBeforeRestartBuffer"));
         self::$isEnabled = true;
         \CJSCore::init(array("fc"), false);
     } elseif (!$isEnabled && self::$isEnabled) {
         if (self::$onBeforeHandleKey >= 0) {
             RemoveEventHandler("main", "OnBeforeEndBufferContent", self::$onBeforeHandleKey);
         }
         if (self::$onBeforeHandleKey >= 0) {
             RemoveEventHandler("main", "OnEndBufferContent", self::$onHandleKey);
         }
         if (self::$onRestartBufferHandleKey >= 0) {
             RemoveEventHandler("main", "OnBeforeRestartBuffer", self::$onRestartBufferHandleKey);
         }
         self::$isEnabled = false;
     }
 }
开发者ID:spas-viktor,项目名称:books,代码行数:26,代码来源:frame.php

示例2: setEnable

 /**
  * Sets isEnable property value
  * @param bool $isEnable
  */
 public static function setEnable($isEnable = true)
 {
     if ($isEnable && !self::$isEnable) {
         self::$onBeforeHandleKey = AddEventHandler("main", "OnBeforeEndBufferContent", array(__CLASS__, "OnBeforeEndBufferContent"));
         self::$onHandleKey = AddEventHandler("main", "OnEndBufferContent", array(__CLASS__, "OnEndBufferContent"));
         self::$isEnable = true;
         \CJSCore::init(array("fc"), false);
         $actionType = \Bitrix\Main\Context::getCurrent()->getServer()->get("HTTP_BX_ACTION_TYPE");
         if ($actionType == "get_dynamic") {
             //Is it the background request?
             self::$isBackgroundRequest = true;
         }
     } elseif (!$isEnable && self::$isEnable) {
         if (self::$onBeforeHandleKey >= 0) {
             RemoveEventHandler("main", "OnBeforeEndBufferContent", self::$onBeforeHandleKey);
         }
         if (self::$onBeforeHandleKey >= 0) {
             RemoveEventHandler("main", "OnEndBufferContent", self::$onHandleKey);
         }
         self::$isEnable = false;
     }
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:26,代码来源:framecache.php

示例3: CAdminTabControl

<?php

// подключим все необходимые файлы:
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
// первый общий пролог
\Bitrix\Main\Loader::includeModule('xpage.seofilter');
\Bitrix\Main\Loader::includeModule('iblock');
CJSCore::init('jquery');
// подключим языковой файл
IncludeModuleLangFile(__FILE__);
$aTabs = [["DIV" => "edit1", "TAB" => "Основное", "ICON" => "main_user_edit", "TITLE" => "Настройки"]];
$tabControl = new CAdminTabControl("tabControl", $aTabs);
$ID = intval($ID);
// идентификатор редактируемой записи
$message = null;
// сообщение об ошибке
$bVarsFromForm = false;
// флаг "Данные получены с формы", обозначающий, что выводимые данные получены с формы, а не из БД.
// ******************************************************************** //
//                ОБРАБОТКА ИЗМЕНЕНИЙ ФОРМЫ                             //
// ******************************************************************** //
if ($REQUEST_METHOD == "POST" && ($save != "" || $apply != "") && check_bitrix_sessid()) {
    // обработка данных формы
    $arFields = ["TITLE" => $TITLE, "SORT" => $SORT, "PROPERTY_ID" => $PROPERTY_ID];
    // сохранение данных
    if ($ID > 0) {
        $res = \Xpage\SeoFilter\PropertyTable::update($ID, $arFields);
    } else {
        $res = \Xpage\SeoFilter\PropertyTable::add($arFields);
    }
    if ($res->isSuccess()) {
开发者ID:HannibalLecktor,项目名称:alfa74,代码行数:31,代码来源:seofilter_property_edit.php

示例4: shouldBeEnabled

 /**
  * Checks whether HTML Cache should be enabled.
  *
  * @return void
  */
 public static function shouldBeEnabled()
 {
     if (defined("USE_HTML_STATIC_CACHE") && USE_HTML_STATIC_CACHE === true) {
         if (!defined("BX_SKIP_SESSION_EXPAND") && (!defined("ADMIN_SECTION") || defined("ADMIN_SECTION") && ADMIN_SECTION != "Y")) {
             self::setUseHTMLCache();
             // define("BX_SKIP_SESSION_EXPAND", true);
         }
     } elseif (defined("ENABLE_HTML_STATIC_CACHE_JS") && ENABLE_HTML_STATIC_CACHE_JS === true && (!defined("ADMIN_SECTION") || ADMIN_SECTION !== true)) {
         \CJSCore::init(array("fc"));
         //to warm up localStorage
     }
 }
开发者ID:rasuldev,项目名称:torino,代码行数:17,代码来源:frame.php

示例5: ___1149546406

if (isset($_GET[___1149546406(535)]) && $_GET[___1149546406(536)] != ___1149546406(537)) {
    $GLOBALS[___1149546406(538)]->SetShowIncludeAreas($_GET[___1149546406(539)] == ___1149546406(540));
}
if ($GLOBALS[___1149546406(541)]->{$GLOBALS}['_____296732968'][39]()) {
    $_1439800944 = COption::$GLOBALS['_____296732968'][40](___1149546406(542), ___1149546406(543), ___1149546406(544));
    if (!isset($_COOKIE[$_1439800944 . ___1149546406(545)])) {
        $GLOBALS[___1149546406(546)]->set_cookie(___1149546406(547), ___1149546406(548), 237 * 2 - 474);
    }
}
if ($GLOBALS['____787902325'][128](___1149546406(549)) && USE_HTML_STATIC_CACHE === true) {
    if (!$GLOBALS['____787902325'][129](___1149546406(550)) && (!$GLOBALS['____787902325'][130](___1149546406(551)) || $GLOBALS['____787902325'][131](___1149546406(552)) && ADMIN_SECTION != ___1149546406(553))) {
        \Bitrix\Main\Page\Frame::getInstance()->setUseHTMLCache();
        $GLOBALS['____787902325'][132](___1149546406(554), true);
    }
} elseif ($GLOBALS['____787902325'][133](___1149546406(555)) && ENABLE_HTML_STATIC_CACHE_JS === true && (!$GLOBALS['____787902325'][134](___1149546406(556)) || ADMIN_SECTION !== true)) {
    CJSCore::init(array(___1149546406(557)));
}
foreach ($GLOBALS['_____296732968'][41](___1149546406(558), ___1149546406(559), true) as $_60804086) {
    ExecuteModuleEventEx($_60804086);
}
if ((!$GLOBALS['____787902325'][135](___1149546406(560)) || NOT_CHECK_PERMISSIONS !== true) && (!$GLOBALS['____787902325'][136](___1149546406(561)) || NOT_CHECK_FILE_PERMISSIONS !== true)) {
    $_1021365968 = $GLOBALS[___1149546406(562)]->{$GLOBALS}['_____296732968'][42](true);
    if (isset($_SERVER[___1149546406(563)]) && $_SERVER[___1149546406(564)] != ___1149546406(565)) {
        $_1021365968 = $_SERVER[___1149546406(566)];
    }
    if (!$GLOBALS[___1149546406(567)]->CanDoFileOperation(___1149546406(568), array(SITE_ID, $_1021365968)) || $GLOBALS['____787902325'][137](___1149546406(569)) && NEED_AUTH && !$GLOBALS[___1149546406(570)]->{$GLOBALS}['_____296732968'][43]()) {
        if ($GLOBALS[___1149546406(571)]->{$GLOBALS}['_____296732968'][44]() && $_1155945949[___1149546406(572)] == ___1149546406(573)) {
            $_1155945949 = array(___1149546406(574) => GetMessage(___1149546406(575)) . ___1149546406(576) . GetMessage(___1149546406(577), array(___1149546406(578) => $_1021365968)), ___1149546406(579) => ___1149546406(580));
        }
        if ($GLOBALS['____787902325'][138](___1149546406(581)) && ADMIN_SECTION == true) {
            if ($_REQUEST[___1149546406(582)] == ___1149546406(583) || $_REQUEST[___1149546406(584)] == ___1149546406(585)) {
开发者ID:supertest223,项目名称:bitrixtest,代码行数:31,代码来源:include.php

示例6: initAdminPopup

 public static function initAdminPopup(array $params = array())
 {
     \CJSCore::registerExt("socialservices_admin", array('js' => "/bitrix/js/socialservices/ss_admin.js", 'css' => "/bitrix/js/socialservices/css/ss_admin.css", 'rel' => array("ajax", "window"), 'lang_additional' => array("SS_NETWORK_DISPLAY" => $params["SHOW"] ? "Y" : "N", "SS_NETWORK_URL" => static::getAuthUrl("popup", array("admin")), "SS_NETWORK_POPUP_TITLE" => Loc::getMessage('B24NET_POPUP_TITLE'), "SS_NETWORK_POPUP_CONNECT" => Loc::getMessage('B24NET_POPUP_CONNECT'), "SS_NETWORK_POPUP_TEXT" => Loc::getMessage('B24NET_POPUP_TEXT'), "SS_NETWORK_POPUP_DONTSHOW" => Loc::getMessage('B24NET_POPUP_DONTSHOW'))));
     \CJSCore::init(array("socialservices_admin"));
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:5,代码来源:network.php

示例7: ___1576439641

if (isset($_GET[___1576439641(535)]) && $_GET[___1576439641(536)] != ___1576439641(537)) {
    $GLOBALS[___1576439641(538)]->SetShowIncludeAreas($_GET[___1576439641(539)] == ___1576439641(540));
}
if ($GLOBALS[___1576439641(541)]->{$GLOBALS}['_____857038069'][39]()) {
    $_21078363 = COption::$GLOBALS['_____857038069'][40](___1576439641(542), ___1576439641(543), ___1576439641(544));
    if (!isset($_COOKIE[$_21078363 . ___1576439641(545)])) {
        $GLOBALS[___1576439641(546)]->set_cookie(___1576439641(547), ___1576439641(548), 1256 / 2 - 628);
    }
}
if ($GLOBALS['____2098935744'][128](___1576439641(549)) && USE_HTML_STATIC_CACHE === true) {
    if (!$GLOBALS['____2098935744'][129](___1576439641(550)) && (!$GLOBALS['____2098935744'][130](___1576439641(551)) || $GLOBALS['____2098935744'][131](___1576439641(552)) && ADMIN_SECTION != ___1576439641(553))) {
        \Bitrix\Main\Page\Frame::getInstance()->setUseHTMLCache();
        $GLOBALS['____2098935744'][132](___1576439641(554), true);
    }
} elseif ($GLOBALS['____2098935744'][133](___1576439641(555)) && ENABLE_HTML_STATIC_CACHE_JS === true && (!$GLOBALS['____2098935744'][134](___1576439641(556)) || ADMIN_SECTION !== true)) {
    CJSCore::init(array(___1576439641(557)));
}
foreach ($GLOBALS['_____857038069'][41](___1576439641(558), ___1576439641(559), true) as $_975686159) {
    ExecuteModuleEventEx($_975686159);
}
if ((!$GLOBALS['____2098935744'][135](___1576439641(560)) || NOT_CHECK_PERMISSIONS !== true) && (!$GLOBALS['____2098935744'][136](___1576439641(561)) || NOT_CHECK_FILE_PERMISSIONS !== true)) {
    $_1130567803 = $GLOBALS[___1576439641(562)]->{$GLOBALS}['_____857038069'][42](true);
    if (isset($_SERVER[___1576439641(563)]) && $_SERVER[___1576439641(564)] != ___1576439641(565)) {
        $_1130567803 = $_SERVER[___1576439641(566)];
    }
    if (!$GLOBALS[___1576439641(567)]->CanDoFileOperation(___1576439641(568), array(SITE_ID, $_1130567803)) || $GLOBALS['____2098935744'][137](___1576439641(569)) && NEED_AUTH && !$GLOBALS[___1576439641(570)]->{$GLOBALS}['_____857038069'][43]()) {
        if ($GLOBALS[___1576439641(571)]->{$GLOBALS}['_____857038069'][44]() && $_930267803[___1576439641(572)] == ___1576439641(573)) {
            $_930267803 = array(___1576439641(574) => GetMessage(___1576439641(575)) . ___1576439641(576) . GetMessage(___1576439641(577), array(___1576439641(578) => $_1130567803)), ___1576439641(579) => ___1576439641(580));
        }
        if ($GLOBALS['____2098935744'][138](___1576439641(581)) && ADMIN_SECTION == true) {
            if ($_REQUEST[___1576439641(582)] == ___1576439641(583) || $_REQUEST[___1576439641(584)] == ___1576439641(585)) {
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:include.php


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