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


PHP rex_view::setJsProperty方法代碼示例

本文整理匯總了PHP中rex_view::setJsProperty方法的典型用法代碼示例。如果您正苦於以下問題:PHP rex_view::setJsProperty方法的具體用法?PHP rex_view::setJsProperty怎麽用?PHP rex_view::setJsProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在rex_view的用法示例。


在下文中一共展示了rex_view::setJsProperty方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

<?php

/**
 * REDAXO customizer.
 *
 * Codemirror by : http://codemirror.net/
 * Marijn Haverbeke <marijnh@gmail.com>
 */
if (rex::isBackend() && rex::getUser()) {
    $config = $this->getConfig();
    rex_view::addCssFile($this->getAssetsUrl('css/styles.css'));
    if ($config['codemirror']) {
        rex_view::addCssFile($this->getAssetsUrl('vendor/codemirror/codemirror.css'));
        rex_view::addCssFile($this->getAssetsUrl('vendor/codemirror/theme/' . $config['codemirror_theme'] . '.css'));
        if ($config['codemirror_theme'] != '') {
            rex_view::setJsProperty('customizer_codemirror_defaulttheme', $config['codemirror_theme']);
        }
        rex_view::addJsFile($this->getAssetsUrl('vendor/codemirror/codemirror-compressed.js'));
    }
    if ($config['labelcolor'] != '') {
        rex_view::setJsProperty('customizer_labelcolor', $config['labelcolor']);
    }
    if ($config['showlink']) {
        rex_view::setJsProperty('customizer_showlink', '<h1 class="be-style-customizer-title"><a href="' . rex::getServer() . '" target="_blank">' . rex::getServerName() . '</a><i class="fa fa-external-link"></i></h1>');
    }
    rex_view::addJsFile($this->getAssetsUrl('js/main.js'));
}
開發者ID:staabm,項目名稱:redaxo,代碼行數:27,代碼來源:boot.php

示例2: rex_extension_point

rex_view::setJsProperty('accesskeys', rex::getProperty('use_accesskeys'));
// ----- INCLUDE ADDONS
include_once rex_path::core('packages.php');
// ----- Prepare AddOn Pages
if (rex::getUser()) {
    rex_be_controller::appendPackagePages();
}
$pages = rex_extension::registerPoint(new rex_extension_point('PAGES_PREPARED', rex_be_controller::getPages()));
rex_be_controller::setPages($pages);
// Set Startpage
if ($user = rex::getUser()) {
    // --- page pruefen und benoetigte rechte checken
    rex_be_controller::checkPagePermissions($user);
}
$page = rex_be_controller::getCurrentPage();
rex_view::setJsProperty('page', $page);
// ----- EXTENSION POINT
// page variable validated
rex_extension::registerPoint(new rex_extension_point('PAGE_CHECKED', $page, ['pages' => $pages], true));
// trigger api functions
// If the backend session is timed out, rex_api_function would throw an exception
// so only trigger api functions if page != login
if ($page != 'login') {
    rex_api_function::handleCall();
}
// include the requested backend page
rex_be_controller::includeCurrentPage();
// ----- caching end für output filter
$CONTENT = ob_get_contents();
ob_end_clean();
// ----- inhalt ausgeben
開發者ID:VIEWSION,項目名稱:redaxo,代碼行數:31,代碼來源:backend.php

示例3:

<?php

/**
 * Mediapool Addon.
 *
 * @author jan[dot]kristinus[at]redaxo[dot]de Jan Kristinus
 *
 * @package redaxo5
 *
 * @var rex_addon $this
 */
$mypage = 'mediapool';
rex_complex_perm::register('media', 'rex_media_perm');
if (rex::isBackend() && rex::getUser()) {
    require_once __DIR__ . '/functions/function_rex_mediapool.php';
    rex_view::addJsFile($this->getAssetsUrl('mediapool.js'));
    rex_view::setJsProperty('imageExtensions', $this->getProperty('image_extensions'));
}
開發者ID:staabm,項目名稱:redaxo,代碼行數:18,代碼來源:boot.php


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