本文整理汇总了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'));
}
示例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
示例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'));
}