• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Page\Asset类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Bitrix\Main\Page\Asset的典型用法代码示例。如果您正苦于以下问题:PHP Asset类的具体用法?PHP Asset怎么用?PHP Asset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: onBeforeEndBufferContent

 public function onBeforeEndBufferContent()
 {
     global $USER;
     if ($USER->IsAuthorized()) {
         Asset::getInstance()->addString("<script>(window.BX||top.BX).message({ 'USER_ID': '" . $USER->GetID() . "'});</script>", $unique = false, AssetLocation::AFTER_JS, AssetMode::ALL);
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:7,代码来源:cacheprovider.php


示例2: onBeforeHTMLEditorScriptRuns

 public static function onBeforeHTMLEditorScriptRuns()
 {
     $asset = Asset::getInstance();
     $asset->addJs('/bitrix/js/newkaliningrad.typografru/typograf.js');
     $messages = Loc::loadLanguageFile(Path::normalize(__FILE__));
     $asset->addString(sprintf('<script>BX.message(%s)</script>', Json::encode($messages, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE)));
 }
开发者ID:askew-,项目名称:bitrix-typograf,代码行数:7,代码来源:typograf.php


示例3: initScripts

 public static function initScripts($arData)
 {
     global $APPLICATION;
     $arExt = array('planner');
     $arScripts = array();
     if (is_array($arData['SCRIPTS'])) {
         foreach ($arData['SCRIPTS'] as $script) {
             if (CJSCore::IsExtRegistered($script)) {
                 $arExt[] = $script;
             } else {
                 $arScripts[] = $script;
             }
         }
     }
     if (is_array($arData['STYLES'])) {
         foreach ($arData['STYLES'] as $style) {
             $APPLICATION->SetAdditionalCSS($style);
         }
     }
     \Bitrix\Main\Page\Asset::getInstance()->addJsKernelInfo('calendar_planner_handler', array('/bitrix/js/calendar/core_planner_handler.js'));
     \Bitrix\Main\Page\Asset::getInstance()->addCssKernelInfo('calendar_planner_handler', array('/bitrix/js/calendar/core_planner_handler.css'));
     CJSCore::Init($arExt);
     foreach ($arScripts as $script) {
         $APPLICATION->AddHeadScript($script);
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:26,代码来源:planner.php


示例4: initControlHelpers

 private function initControlHelpers()
 {
     if (!static::$controlIsRendered) {
         Asset::getInstance()->addJs('/bitrix/js/iblock/iblock_edit.js');
         static::$controlIsRendered = true;
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:7,代码来源:usertypepropertyelist.php


示例5: getScripts

    /**
     * @return string
     */
    public static function getScripts()
    {
        \Bitrix\Main\Page\Asset::getInstance()->addJs("/bitrix/js/sale/admin/order_info.js");
        return '
			<script type="text/javascript">
				BX.ready(function(){
					BX.Sale.Admin.OrderEditPage.registerFieldsUpdaters( BX.Sale.Admin.OrderInfo.getFieldsUpdaters() );
				});
			</script>
		';
    }
开发者ID:Satariall,项目名称:izurit,代码行数:14,代码来源:orderinfo.php


示例6: getScripts

    public static function getScripts()
    {
        $result = '';
        if (!static::$jsInited) {
            \Bitrix\Main\Page\Asset::getInstance()->addJs("/bitrix/js/sale/admin/order_basket_settings.js");
            $result .= '
					BX.message({
						SALE_ORDER_BASKET_JS_SETTINGS_TITLE: "' . \CUtil::JSEscape(Loc::getMessage("SALE_ORDER_BASKET_JS_SETTINGS_TITLE")) . '",
						SALE_ORDER_BASKET_JS_SETTINGS_APPLY: "' . \CUtil::JSEscape(Loc::getMessage("SALE_ORDER_BASKET_JS_SETTINGS_APPLY")) . '"
					});
			';
            static::$jsInited = true;
        }
        return $result;
    }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:15,代码来源:orderbasketsettings.php


示例7: processActionDefault

 protected function processActionDefault()
 {
     $pathToAjax = isset($this->arParams['AJAX_PATH']) ? $this->arParams['AJAX_PATH'] : '/bitrix/components/bitrix/disk.bitrix24disk/ajax.php';
     /** @noinspection PhpDynamicAsStaticMethodCallInspection */
     $quota = CDiskQuota::getDiskQuota();
     $this->arResult['showDiskQuota'] = false;
     //$quota !== true; //now without quota
     $this->arResult['diskSpace'] = (double) COption::getOptionInt('main', 'disk_space') * 1024 * 1024;
     $this->arResult['quota'] = $quota;
     $this->arResult['ajaxIndex'] = $pathToAjax;
     $this->arResult['ajaxStorageIndex'] = '/desktop_app/storage.php';
     $this->arResult['isInstalledDisk'] = \Bitrix\Disk\Desktop::isDesktopDiskInstall();
     $this->arResult['personalLibIndex'] = '/company/personal/user/' . $this->getUser()->getId() . '/disk/path/';
     $this->arResult['isInstalledPull'] = (bool) isModuleInstalled('pull');
     $this->arResult['currentUser'] = array('id' => $this->getUser()->getId(), 'formattedName' => $this->getUser()->getFormattedName());
     Asset::getInstance()->addJs('/bitrix/components/bitrix/disk.bitrix24disk/disk.js');
     $this->includeComponentTemplate();
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:18,代码来源:class.php


示例8: getScripts

    /**
     * @param Order $order
     * @param $formId
     * @return string
     */
    public static function getScripts(Order $order, $formId)
    {
        Asset::getInstance()->addJs("/bitrix/js/sale/admin/order_edit.js");
        Asset::getInstance()->addJs("/bitrix/js/sale/admin/order_ajaxer.js");
        $currencyId = $order->getCurrency();
        $currencies = array();
        if (Loader::includeModule('currency')) {
            \CJSCore::Init(array('currency'));
            $currencyFormat = \CCurrencyLang::getFormatDescription($currencyId);
            $currencies = array(array('CURRENCY' => $currencyId, 'FORMAT' => array('FORMAT_STRING' => $currencyFormat['FORMAT_STRING'], 'DEC_POINT' => $currencyFormat['DEC_POINT'], 'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'], 'DECIMALS' => $currencyFormat['DECIMALS'], 'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'], 'HIDE_ZERO' => "N")));
        }
        $curFormat = \CCurrencyLang::getCurrencyFormat($currencyId);
        $currencyLang = trim(str_replace("#", '', $curFormat["FORMAT_STRING"]));
        $langPhrases = array("SALE_ORDEREDIT_DISCOUNT_UNKNOWN", "SALE_ORDEREDIT_REFRESHING_DATA", "SALE_ORDEREDIT_FIX", "SALE_ORDEREDIT_UNFIX");
        $result = '
			<script type="text/javascript">
				BX.ready(function(){
					BX.Sale.Admin.OrderEditPage.orderId = "' . $order->getId() . '";
					BX.Sale.Admin.OrderEditPage.siteId = "' . $order->getSiteId() . '";
					BX.Sale.Admin.OrderEditPage.languageId = "' . LANGUAGE_ID . '";
					BX.Sale.Admin.OrderEditPage.formId = "' . $formId . '_form";
					BX.Sale.Admin.OrderEditPage.adminTabControlId = "' . $formId . '";
					' . (!empty($currencies) ? 'BX.Currency.setCurrencies(' . \CUtil::PhpToJSObject($currencies, false, true, true) . ');' : '') . 'BX.Sale.Admin.OrderEditPage.currency = "' . $currencyId . '";
					BX.Sale.Admin.OrderEditPage.currencyLang = "' . \CUtil::JSEscape($currencyLang) . '";';
        if ($formId == "sale_order_create") {
            $result .= '
					BX.Sale.Admin.OrderEditPage.registerFieldsUpdaters(BX.Sale.Admin.OrderPayment.prototype.getCreateOrderFieldsUpdaters());';
        }
        foreach ($langPhrases as $phrase) {
            $result .= ' BX.message({' . $phrase . ': "' . \CUtil::JSEscape(Loc::getMessage($phrase)) . '"});';
        }
        $result .= '});
			</script>
		';
        return $result;
    }
开发者ID:webgksupport,项目名称:alpina,代码行数:41,代码来源:orderedit.php


示例9: GetMessageJS

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
\Bitrix\Main\Page\Asset::getInstance()->addJs('/bitrix/js/bizproc/tools.js');
$cmpId = RandString();
if (empty($arResult['DOCUMENT_ICON'])) {
    $moduleIcon = 'default';
    if (in_array($arResult['TASK']['MODULE_ID'], array('crm', 'disk', 'iblock', 'lists', 'tasks'))) {
        $moduleIcon = $arResult['TASK']['MODULE_ID'];
    }
    $arResult['DOCUMENT_ICON'] = $templateFolder . '/images/bp-' . $moduleIcon . '-icon.png';
}
?>
<script type="text/javascript">
	BX.message({
		BPAT_DELEGATE_SELECT : '<?php 
echo GetMessageJS('BPAT_DELEGATE_SELECT');
?>
',
		BPAT_DELEGATE_CANCEL : '<?php 
echo GetMessageJS('BPAT_DELEGATE_CANCEL');
?>
'
	});
</script>
<?php 
if ($arParams['POPUP']) {
    ?>
<div class="bp-popup-title"><?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php


示例10: getScripts

    /**
     * @return string
     */
    public static function getScripts()
    {
        Asset::getInstance()->addJs("/bitrix/js/sale/admin/order_payment.js");
        $imgPathList = self::getImgPathList();
        $message = array('PAYMENT_PAID_NO' => Loc::getMessage('SALE_ORDER_PAYMENT_STATUS_NO'), 'PAYMENT_PAID_YES' => Loc::getMessage('SALE_ORDER_PAYMENT_STATUS_YES'), 'PAYMENT_PAID_RETURN' => Loc::getMessage('SALE_ORDER_PAYMENT_RETURN'), 'PAYMENT_PAID_CANCEL' => Loc::getMessage('SALE_ORDER_PAYMENT_CANCEL'), 'PAYMENT_RETURN_COMMENT' => Loc::getMessage('SALE_ORDER_PAYMENT_RETURN_COMMENT'), 'PAYMENT_RETURN_NUM' => Loc::getMessage('SALE_ORDER_PAYMENT_RETURN_NUM'), 'PAYMENT_RETURN_DATE' => Loc::getMessage('SALE_ORDER_PAYMENT_RETURN_DATE'), 'PAYMENT_OPERATION_TITLE' => Loc::getMessage('SALE_ORDER_PAYMENT_OPERATION_TITLE'), 'PAYMENT_OPERATION_RETURN' => Loc::getMessage('SALE_ORDER_PAYMENT_OPERATION_RETURN'), 'PAYMENT_RETURN_DATE_ALT' => Loc::getMessage('SALE_ORDER_PAYMENT_RETURN_DATE_ALT'), 'PAYMENT_WINDOW_RETURN_TITLE' => Loc::getMessage('SALE_ORDER_PAYMENT_WINDOW_RETURN_TITLE'), 'PAYMENT_WINDOW_CANCEL_TITLE' => Loc::getMessage('SALE_ORDER_PAYMENT_WINDOW_CANCEL_TITLE'), 'PAYMENT_WINDOW_RETURN_BUTTON_SAVE' => Loc::getMessage('SALE_ORDER_PAYMENT_WINDOW_RETURN_BUTTON_SAVE'), 'PAYMENT_RETURN_NUM_DOC' => Loc::getMessage('SALE_ORDER_PAYMENT_RETURN_NUM_DOC'), 'PAYMENT_RETURN_SUM' => Loc::getMessage('SALE_ORDER_PAYMENT_RETURN_SUM'), 'PAYMENT_OPERATION_CANCEL' => Loc::getMessage('SALE_ORDER_PAYMENT_OPERATION_CANCEL'), 'PAYMENT_TOGGLE_DOWN' => Loc::getMessage('SALE_ORDER_PAYMENT_TOGGLE_DOWN'), 'PAYMENT_TOGGLE_UP' => Loc::getMessage('SALE_ORDER_PAYMENT_TOGGLE_UP'), 'PAYMENT_PAY_VOUCHER_NUM' => Loc::getMessage('SALE_ORDER_PAYMENT_PAY_VOUCHER_NUM'), 'PAYMENT_PAY_VOUCHER_DATE' => Loc::getMessage('SALE_ORDER_PAYMENT_PAY_VOUCHER_DATE'), 'PAYMENT_WINDOW_VOUCHER_TITLE' => Loc::getMessage('SALE_ORDER_PAYMENT_WINDOW_VOUCHER_TITLE'), 'PAYMENT_USE_INNER_BUDGET' => Loc::getMessage('SALE_ORDER_PAYMENT_USE_INNER_BUDGET'), 'PAYMENT_ORDER_STATUS' => Loc::getMessage('SALE_ORDER_PAYMENT_ORDER_STATUS'), 'PAYMENT_CONFIRM_DELETE' => Loc::getMessage('SALE_ORDER_PAYMENT_CONFIRM_DELETE'));
        return '<script type="text/javascript">
			BX.message(' . \CUtil::PhpToJSObject($message) . ');
			logoList = ' . \CUtil::PhpToJSObject($imgPathList) . ';

			BX.ready(function(){
				if(BX.Sale.Admin.OrderEditPage && BX.Sale.Admin.OrderEditPage.registerFieldsUpdaters)
					BX.Sale.Admin.OrderEditPage.registerFieldsUpdaters( BX.Sale.Admin.OrderPayment.prototype.getCreateOrderFieldsUpdaters() );
			});

		</script>';
    }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:19,代码来源:orderpayment.php


示例11: unset

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!empty($_REQUEST['action_button_' . $arResult["GRID_ID"]])) {
    //@TODO remake
    unset($_REQUEST['bxajaxid'], $_REQUEST['AJAX_CALL']);
}
\Bitrix\Main\Page\Asset::getInstance()->addJs('/bitrix/js/bizproc/tools.js');
\Bitrix\Main\Page\Asset::getInstance()->addCss('/bitrix/components/bitrix/bizproc.workflow.faces/templates/.default/style.css');
if (strlen($arResult["FatalErrorMessage"]) > 0) {
    ?>
	<div class="bp-errortext">
		<?php 
    echo $arResult["FatalErrorMessage"];
    ?>
	</div>
	<?php 
} else {
    ?>
	<div class="bp-interface-toolbar-container">
		<div class="bp-interface-toolbar">
			<table cellpadding="0" cellspacing="0" border="0" class="" style="width: 100%;">
				<tbody>
				<tr>
					<td>
						<table cellpadding="0" cellspacing="0" border="0">
							<tbody>
							<tr>
								<?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php


示例12:

    die;
}
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\Page\Asset;
Asset::getInstance()->addJs($this->GetFolder() . '/right.js');
?>

<div class="bx-lists-total-div-class" id="bx-lists-total-div-id">
	<input type="hidden" id="bx-lists-selected-list" name="IBLOCK_ID">
	<input type="hidden" id="bx-lists-lists-page" value="<?php 
echo $arResult['LISTS_URL'];
?>
">
	<div id="bx-lists-store-lists" style="display:none"></div>
	<table class="bx-lists-table-title" id="bx-lists-table-title-id">
		<tr>
			<td class="bx-lists-table-td-title">
				<span class="bx-lists-title-desc-icon" id="bx-lists-table-td-title-img"></span>
				<span id="bx-lists-table-td-title"></span>
			</td>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php


示例13: getScripts

    public static function getScripts()
    {
        \Bitrix\Main\Page\Asset::getInstance()->addJs("/bitrix/js/sale/admin/order_additional_info.js");
        return '<script type="text/javascript">' . 'BX.message({
				SALE_ORDER_ADDITIONAL_INFO_COMMENT_EDIT: "' . \CUtil::jsEscape(Loc::getMessage("SALE_ORDER_ADDITIONAL_INFO_COMMENT_EDIT")) . '",
				SALE_ORDER_ADDITIONAL_INFO_COMMENT_SAVE: "' . \CUtil::jsEscape(Loc::getMessage("SALE_ORDER_ADDITIONAL_INFO_COMMENT_SAVE")) . '",
				SALE_ORDER_ADDITIONAL_INFO_NO_COMMENT: "' . \CUtil::jsEscape(Loc::getMessage("SALE_ORDER_ADDITIONAL_INFO_NO_COMMENT")) . '"
			})' . '</script>';
    }
开发者ID:webgksupport,项目名称:alpina,代码行数:9,代码来源:orderadditional.php


示例14: array

        if ($saleModulePermissions >= "W") {
            $arActions[] = array("SEPARATOR" => true);
            $arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMessage("SALE_DSE_DELETE"), "ACTION" => "if(confirm('" . Loc::getMessage('SALE_DSE_CONFIRM_DEL_PROFILE_MESSAGE') . "')) " . $lAdminSubServices->ActionRedirect("sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $fields["PARENT_ID"] . "&ID=" . $ID . "&action=profile_delete&ID_PROF=" . $f_ID));
        }
        $row->AddActions($arActions);
    }
    if ($saleModulePermissions == "W") {
        $aContext = array(array("TEXT" => Loc::getMessage("SALE_DSE_ADD_NEW_PROFILE"), "LINK" => "sale_delivery_service_edit.php?lang=" . LANG . "&PARENT_ID=" . $ID . "&back_url=" . urlencode($APPLICATION->GetCurPageParam()), "TITLE" => Loc::getMessage("SALE_DSE_ADD_NEW_PROFILE_TITLE"), "ICON" => "btn_new"));
        $lAdminSubServices->AddAdminContextMenu($aContext, false);
    }
    if ($_REQUEST["table_id"] == $sTableIDSubService) {
        $lAdminSubServices->CheckListMode();
    }
}
/* profiles end */
Asset::getInstance()->addJs("/bitrix/js/sale/delivery.js");
if ($parentService && get_class($parentService) != 'Bitrix\\Sale\\Delivery\\Services\\Group') {
    if ($ID > 0) {
        $sDocTitle = str_replace(array("#NAME#", "#PARENT_NAME#"), array($fields["NAME"], $parentService->getName()), Loc::getMessage("SALE_DSE_EDIT_RECORD_PROFILE"));
    } else {
        $sDocTitle = str_replace("#PARENT_NAME#", $parentService->getName(), Loc::getMessage("SALE_DSE_NEW_RECORD_PROFILE"));
    }
} else {
    if ($isGroup) {
        if ($ID > 0) {
            $sDocTitle = str_replace("#NAME#", $fields["NAME"], Loc::getMessage("SALE_DSE_EDIT_GROUP"));
        } else {
            $sDocTitle = Loc::getMessage("SALE_DSE_NEW_GROUP");
        }
    } else {
        if ($ID > 0) {
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:delivery_service_edit.php


示例15: getScripts

 public static function getScripts()
 {
     Asset::getInstance()->addJs("/bitrix/js/sale/admin/order_shipment.js");
     $message = array('SALE_ORDER_SHIPMENT_DEDUCTED_YES' => Loc::getMessage('SALE_ORDER_SHIPMENT_DEDUCTED_YES'), 'SALE_ORDER_SHIPMENT_DEDUCTED_NO' => Loc::getMessage('SALE_ORDER_SHIPMENT_DEDUCTED_NO'), 'SALE_ORDER_SHIPMENT_ALLOW_DELIVERY_YES' => Loc::getMessage('SALE_ORDER_SHIPMENT_ALLOW_DELIVERY_YES'), 'SALE_ORDER_SHIPMENT_ALLOW_DELIVERY_NO' => Loc::getMessage('SALE_ORDER_SHIPMENT_ALLOW_DELIVERY_NO'), 'SALE_ORDER_SHIPMENT_NEW_PRICE_DELIVERY' => Loc::getMessage('SALE_ORDER_SHIPMENT_NEW_PRICE_DELIVERY'), 'SALE_ORDER_SHIPMENT_APPLY' => Loc::getMessage('SALE_ORDER_SHIPMENT_APPLY'), 'SALE_ORDER_SHIPMENT_CONFIRM_SET_NEW_PRICE' => Loc::getMessage('SALE_ORDER_SHIPMENT_CONFIRM_SET_NEW_PRICE'), 'SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT_TOGGLE_UP' => Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT_TOGGLE_UP'), 'SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT_TOGGLE' => Loc::getMessage('SALE_ORDER_SHIPMENT_BLOCK_SHIPMENT_TOGGLE'), 'SALE_ORDER_SHIPMENT_CONFIRM_DELETE_SHIPMENT' => Loc::getMessage('SALE_ORDER_SHIPMENT_CONFIRM_DELETE_SHIPMENT'), 'SALE_ORDER_SHIPMENT_PROFILE' => Loc::getMessage('SALE_ORDER_SHIPMENT_PROFILE'));
     return "<script>\n\t\t\tBX.message(" . \CUtil::PhpToJSObject($message) . ");\n\t\t</script>";
 }
开发者ID:Satariall,项目名称:izurit,代码行数:6,代码来源:ordershipment.php


示例16:

/** @var CBitrixComponent $this */
/** @var array $arParams */
/** @var array $arResult */
/** @global CUser $USER */
/** @global CMain $APPLICATION */

use Bitrix\Highloadblock as HL;
use Bitrix\Main\Entity;
use Bitrix\Main\Type\DateTime;
use Bitrix\Main\Page\Asset;
use \Bitrix\Main\Loader;
use \Bitrix\Main\Application;

// Include Bootstrap and jQuery
Asset::getInstance()->addJs('http://code.jquery.com/jquery-2.1.4.min.js');
Asset::getInstance()->addJs('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js');
$APPLICATION->SetAdditionalCSS('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css');

\Bitrix\Main\Loader::IncludeModule("iblock");

$context = Application::getInstance()->getContext();
$request = $context->getRequest();

$user_name = $request->get("user_name");
$message = $request->get("message");
$submit = $request->get("submit");
$highloadID = $arParams['HIGHLOAD_BLOCK_ID'];


if ($USER->IsAuthorized()) {
    $un = $USER->GetFullName();
开发者ID:At0m1c,项目名称:Bitrix,代码行数:31,代码来源:component.php


示例17: startBuffering

 public function startBuffering($content)
 {
     if (!$this->isEnabled() || !is_object($GLOBALS["APPLICATION"]) || defined("BX_BUFFER_SHUTDOWN")) {
         return null;
     }
     $newBuffer = $GLOBALS["APPLICATION"]->buffer_content;
     $cnt = count($GLOBALS["APPLICATION"]->buffer_content_type);
     Asset::getInstance()->setMode(AssetMode::COMPOSITE);
     $this->compositeWasInjected = false;
     for ($i = 0; $i < $cnt; $i++) {
         $method = $GLOBALS["APPLICATION"]->buffer_content_type[$i]["F"];
         if (!is_array($method) || count($method) !== 2 || $method[0] !== $GLOBALS["APPLICATION"]) {
             continue;
         }
         if (in_array($method[1], array("GetCSS", "GetHeadScripts", "GetHeadStrings"))) {
             $newBuffer[$i * 2 + 1] = call_user_func_array($method, $GLOBALS["APPLICATION"]->buffer_content_type[$i]["P"]);
             if ($this->compositeWasInjected !== true && $method[1] === "GetHeadStrings") {
                 $this->compositeWasInjected = strpos($newBuffer[$i * 2 + 1], "w.frameRequestStart") !== false;
             }
         }
     }
     Asset::getInstance()->setMode(AssetMode::STANDARD);
     return $this->compositeWasInjected === true ? implode("", $newBuffer) . $content : null;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:24,代码来源:frame.php


示例18: CAdminTabControlDrag

	function CAdminTabControlDrag($name, $tabs, $moduleId="", $bCanExpand = true, $bDenyAutosave = false)
	{
		parent::CAdminTabControl($name, $tabs, $bCanExpand, $bDenyAutosave);
		$this->moduleId = $moduleId;
		\Bitrix\Main\Page\Asset::getInstance()->addJs("/bitrix/js/main/admin_dd.js");
	}
开发者ID:nycmic,项目名称:bittest,代码行数:6,代码来源:admin_lib.php


示例19: elseif

    if (($siteClosed = getLocalPath("php_interface/" . LANG . "/site_closed.php", BX_PERSONAL_ROOT)) !== false) {
        include $_SERVER["DOCUMENT_ROOT"] . $siteClosed;
    } elseif (($siteClosed = getLocalPath("php_interface/include/site_closed.php", BX_PERSONAL_ROOT)) !== false) {
        include $_SERVER["DOCUMENT_ROOT"] . $siteClosed;
    } else {
        include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/site_closed.php";
    }
    die;
}
$sPreviewFile = $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/tmp/templates/__bx_preview/header.php";
if (defined("SITE_TEMPLATE_PREVIEW_MODE") && file_exists($sPreviewFile)) {
    include_once $sPreviewFile;
} else {
    \Bitrix\Main\Page\Asset::getInstance()->startTarget('TEMPLATE');
    include_once $_SERVER["DOCUMENT_ROOT"] . SITE_TEMPLATE_PATH . "/header.php";
    \Bitrix\Main\Page\Asset::getInstance()->startTarget('PAGE');
}
/* Draw edit menu for whole content */
global $BX_GLOBAL_AREA_EDIT_ICON;
$BX_GLOBAL_AREA_EDIT_ICON = false;
if ($APPLICATION->GetShowIncludeAreas()) {
    require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/init_admin.php";
    $aUserOpt = CUserOptions::GetOption("global", "settings", array());
    if ($aUserOpt["page_edit_control_enable"] != "N") {
        $documentRoot = CSite::GetSiteDocRoot(SITE_ID);
        if (isset($_SERVER["REAL_FILE_PATH"]) && $_SERVER["REAL_FILE_PATH"] != "") {
            $currentFilePath = $_SERVER["REAL_FILE_PATH"];
        } else {
            $currentFilePath = $APPLICATION->GetCurPage(true);
        }
        $bCanEdit = true;
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:prolog_after.php


示例20: array

    <meta property="og:url" content="<?php 
$APPLICATION->ShowProperty('OG_URL');
?>
" />
    <meta property="og:image" content="<?php 
$APPLICATION->ShowProperty('OG_IMAGE');
?>
" />
    <meta property="og:type" content="website" />
    <meta property="fb:app_id" content="<?php 
echo Option::get('socialservices', 'facebook_appid');
?>
" /><?php 
$APPLICATION->ShowHead();
Asset::getInstance()->addCss(SITE_TEMPLATE_PATH . '/css/styles.css');
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH . '/js/scripts.js');
?>
</head><?php 
?>
<body><?php 
$APPLICATION->ShowPanel();
?>
    <header>
        <?php 
$APPLICATION->IncludeComponent("bitrix:menu", "top", array("ALLOW_MULTI_SELECT" => "N", "CHILD_MENU_TYPE" => "top", "COMPONENT_TEMPLATE" => "top", "DELAY" => "N", "MAX_LEVEL" => "1", "MENU_CACHE_GET_VARS" => array(), "MENU_CACHE_TIME" => "3600", "MENU_CACHE_TYPE" => "A", "MENU_CACHE_USE_GROUPS" => "Y", "ROOT_MENU_TYPE" => "top", "USE_EXT" => "N"), false);
?>
    </header>
    <?php 
if ($APPLICATION->GetProperty('layout') && file_exists($_SERVER['DOCUMENT_ROOT'] . SITE_TEMPLATE_PATH . '/layouts/' . $APPLICATION->GetProperty('layout') . '/header.php')) {
    require 'layouts/' . $APPLICATION->GetProperty('layout') . '/header.php';
} else {
开发者ID:notagency,项目名称:notagency.base,代码行数:31,代码来源:header.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Type\Collection类代码示例发布时间:2022-05-23
下一篇:
PHP Localization\Loc类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap