本文整理汇总了PHP中rex_be_controller::getPages方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_be_controller::getPages方法的具体用法?PHP rex_be_controller::getPages怎么用?PHP rex_be_controller::getPages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_be_controller
的用法示例。
在下文中一共展示了rex_be_controller::getPages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
$fieldContainer->setMultiple(false);
$group = 'all';
$fieldContainer->setActive($group);
// Check all page permissions and add them to rex_perm if not already registered
$registerImplicitePagePermissions = function ($pages) use(&$registerImplicitePagePermissions) {
foreach ($pages as $page) {
foreach ($page->getRequiredPermissions() as $perm) {
// ignore admin perm and complex perms (with "/")
if ($perm && !in_array($perm, ['isAdmin', 'admin', 'admin[]']) && strpos($perm, '/') === false && !rex_perm::has($perm)) {
rex_perm::register($perm);
}
}
$registerImplicitePagePermissions($page->getSubpages());
}
};
$registerImplicitePagePermissions(rex_be_controller::getPages());
foreach ([rex_perm::GENERAL, rex_perm::OPTIONS, rex_perm::EXTRAS] as $permgroup) {
$field = $fieldContainer->addGroupedField($group, 'select', $permgroup);
$field->setLabel(rex_i18n::msg('user_' . $permgroup));
$select = $field->getSelect();
$select->setMultiple(true);
$perms = rex_perm::getAll($permgroup);
$select->setSize(min(10, max(3, count($perms))));
$select->addArrayOptions($perms);
}
rex_extension::register('REX_FORM_INPUT_CLASS', function (rex_extension_point $ep) {
return $ep->getParam('inputType') == 'perm_select' ? 'rex_form_perm_select_element' : null;
});
$fieldIds = [];
foreach (rex_complex_perm::getAll() as $key => $class) {
$params = $class::getFieldParams();
示例2: rex_extension_point
rex_be_controller::setCurrentPage(trim(rex_request('page', 'string')));
}
rex_view::addJsFile(rex_url::coreAssets('jquery.min.js'));
rex_view::addJsFile(rex_url::coreAssets('jquery-ui.custom.min.js'));
rex_view::addJsFile(rex_url::coreAssets('jquery-pjax.min.js'));
rex_view::addJsFile(rex_url::coreAssets('standard.js'));
rex_view::addJsFile(rex_url::coreAssets('sha1.js'));
rex_view::setJsProperty('backend', true);
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') {
示例3: unset
$item['title'] = '<i class="rex-icon rex-icon-sign-out"></i> ' . rex_i18n::msg('logout');
$item['href'] = rex_url::backendController(['rex_logout' => 1]);
$item['attributes'] = 'class="rex-logout"' . rex::getAccesskey(rex_i18n::msg('logout'), 'logout');
$meta_items[] = $item;
unset($item);
} elseif ($hasNavigation) {
$item = [];
$item['title'] = rex_i18n::msg('logged_out');
$meta_items[] = $item;
unset($item);
}
// wird in bottom.php an Fragment uebergeben
$navigation = '';
if (rex::getUser() && $hasNavigation) {
$n = rex_be_navigation::factory();
foreach (rex_be_controller::getPages() as $p => $pageObj) {
$p = strtolower($p);
if ($pageObj instanceof rex_be_page_main) {
$pageObj->setItemAttr('id', 'rex-navi-page-' . strtolower(preg_replace('/[^a-zA-Z0-9\\-]*/', '', str_replace('_', '-', $p))));
if (!$pageObj->getBlock()) {
$pageObj->setBlock('addons');
}
if (!$pageObj->getHref()) {
$pageObj->setHref(rex_url::backendPage($p, [], false));
}
/*
if(isset ($REX['ACKEY']['ADDON'][$page]))
$item['extra'] = rex_accesskey($name, $REX['ACKEY']['ADDON'][$page]);
else
$item['extra'] = rex_accesskey($pageArr['title'], $accesskey++);
*/