本文整理汇总了PHP中rex_be_controller::getPageObject方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_be_controller::getPageObject方法的具体用法?PHP rex_be_controller::getPageObject怎么用?PHP rex_be_controller::getPageObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_be_controller
的用法示例。
在下文中一共展示了rex_be_controller::getPageObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rex_session
if ($rex_file_category == -1) {
$rex_file_category = rex_session('media[rex_file_category]', 'int');
}
$gc = rex_sql::factory();
$gc->setQuery('SELECT * FROM ' . rex::getTablePrefix() . 'media_category WHERE id=' . $rex_file_category);
if ($gc->getRows() != 1) {
$rex_file_category = 0;
$rex_file_category_name = rex_i18n::msg('pool_kats_no');
} else {
$rex_file_category_name = $gc->getValue('name');
}
rex_set_session('media[rex_file_category]', $rex_file_category);
// -------------- PERMS
$PERMALL = rex::getUser()->getComplexPerm('media')->hasCategoryPerm(0);
// -------------- Header
$subline = rex_be_controller::getPageObject('mediapool')->getSubpages();
foreach ($subline as $sp) {
$sp->setHref(rex_url::backendPage($sp->getFullKey(), $arg_url, false));
}
echo rex_view::title(rex_i18n::msg('pool_media'), $subline);
// -------------- Messages
if ($success != '') {
echo rex_view::info($success);
$success = '';
}
if ($error != '') {
echo rex_view::error($error);
$error = '';
}
// -------------- Javascripts
?>
示例2: title
/**
* Returns the formatted title.
*
* @param string $head
* @param null|string|array $subtitle
*
* @throws InvalidArgumentException
*
* @return string
*/
public static function title($head, $subtitle = null)
{
if ($subtitle !== null && !is_string($subtitle) && (!is_array($subtitle) || count($subtitle) > 0 && !reset($subtitle) instanceof rex_be_page)) {
throw new InvalidArgumentException('Expecting $subtitle to be a string or an array of rex_be_page!');
}
if ($subtitle === null) {
$subtitle = rex_be_controller::getPageObject(rex_be_controller::getCurrentPagePart(1))->getSubpages();
}
if (is_array($subtitle) && count($subtitle) && reset($subtitle) instanceof rex_be_page) {
$nav = rex_be_navigation::factory();
$nav->setHeadline('default', rex_i18n::msg('subnavigation', $head));
foreach ($subtitle as $pageObj) {
$nav->addPage($pageObj);
}
$blocks = $nav->getNavigation();
$navigation = [];
if (count($blocks) == 1) {
$navigation = current($blocks);
$navigation = $navigation['navigation'];
}
if (!empty($navigation)) {
$fragment = new rex_fragment();
$fragment->setVar('left', $navigation, false);
$subtitle = $fragment->parse('core/navigations/content.php');
} else {
$subtitle = '';
}
} elseif (!is_string($subtitle)) {
$subtitle = '';
}
$title = rex_extension::registerPoint(new rex_extension_point('PAGE_TITLE', $head));
$fragment = new rex_fragment();
$fragment->setVar('heading', $title, false);
$fragment->setVar('subtitle', $subtitle, false);
$return = $fragment->parse('core/page/header.php');
$return .= rex_extension::registerPoint(new rex_extension_point('PAGE_TITLE_SHOWN', ''));
return $return;
}
示例3: foreach
}
}
// ------------------------------------------ END: MOVE CATEGORY
// ------------------------------------------ START: CONTENT HEAD MENUE
$editPage = rex_be_controller::getPageObject('content/edit');
$editPage->setHref($context->getUrl(['page' => 'content/edit'], false));
foreach ($ctypes as $key => $val) {
$editPage->addSubpage((new rex_be_page('ctype' . $key, rex_i18n::translate($val)))->setHref(['page' => 'content/edit', 'article_id' => $article_id, 'clang' => $clang, 'ctype' => $key], false)->setIsActive($ctype == $key));
}
$nav = rex_be_navigation::factory();
$nav->addPage($editPage);
$blocks = $nav->getNavigation();
$navigation = current($blocks);
$content_navi_left = $navigation['navigation'];
$nav = rex_be_navigation::factory();
foreach (rex_be_controller::getPageObject('content')->getSubpages() as $subpage) {
if ($subpage->getKey() != 'edit') {
$subpage->setHref($context->getUrl(['page' => $subpage->getFullKey()], false));
$nav->addPage($subpage);
}
}
$blocks = $nav->getNavigation();
$navigation = current($blocks);
$content_navi_right = $navigation['navigation'];
$content_navi_right[] = ['title' => '<a href="' . rex_getUrl($article_id, $clang) . '" onclick="window.open(this.href); return false;"><i class="rex-icon rex-icon-view"></i> ' . rex_i18n::msg('article') . ' ' . rex_i18n::msg('show') . '</a>'];
$fragment = new rex_fragment();
$fragment->setVar('id', 'rex-js-structure-content-nav', false);
$fragment->setVar('left', $content_navi_left, false);
$fragment->setVar('right', $content_navi_right, false);
$contentMain = $fragment->parse('core/navigations/content.php');
// ------------------------------------------ END: CONTENT HEAD MENUE
示例4: function
if (!rex::isBackend()) {
\rex_extension::register('OUTPUT_FILTER', '\\Sprog\\Extension::replaceWildcards');
}
if (rex::isBackend() && rex::getUser()) {
\rex_extension::register('CLANG_ADDED', '\\Sprog\\Extension::clangAdded');
\rex_extension::register('CLANG_DELETED', '\\Sprog\\Extension::clangDeleted');
rex_extension::register('PAGES_PREPARED', function () {
if (rex::getUser()->isAdmin()) {
if (\rex_be_controller::getCurrentPage() == 'sprog/settings') {
$func = rex_request('func', 'string');
if ($func == 'update') {
\rex_config::set('sprog', 'wildcard_clang_switch', rex_request('clang_switch', 'bool'));
}
}
}
if (rex::getUser()->isAdmin() || rex::getUser()->hasPerm('sprog[wildcard]')) {
$page = \rex_be_controller::getPageObject('sprog/wildcard');
if (Wildcard::isClangSwitchMode()) {
$clang_id = str_replace('clang', '', rex_be_controller::getCurrentPagePart(3));
$page->setSubPath(rex_path::addon('sprog', 'pages/wildcard.clang_switch.php'));
foreach (\rex_clang::getAll() as $id => $clang) {
if (rex::getUser()->getComplexPerm('clang')->hasPerm($id)) {
$page->addSubpage((new rex_be_page('clang' . $id, $clang->getName()))->setSubPath(rex_path::addon('sprog', 'pages/wildcard.clang_switch.php'))->setIsActive($id == $clang_id));
}
}
} else {
$page->setSubPath(rex_path::addon('sprog', 'pages/wildcard.clang_all.php'));
}
}
});
}
示例5: function
<?php
/**
* Page Content Addon.
*
* @author markus[dot]staab[at]redaxo[dot]de Markus Staab
*
* @package redaxo5
*/
rex_perm::register('moveSlice[]', null, rex_perm::OPTIONS);
rex_complex_perm::register('modules', 'rex_module_perm');
if (rex::isBackend()) {
rex_extension::register('PAGE_CHECKED', function () {
if (rex_be_controller::getCurrentPagePart(1) == 'content') {
rex_be_controller::getPageObject('structure')->setIsActive(true);
}
});
if (rex_be_controller::getCurrentPagePart(1) == 'system') {
rex_system_setting::register(new rex_system_setting_default_template_id());
}
rex_extension::register('CLANG_DELETED', function (rex_extension_point $ep) {
$del = rex_sql::factory();
$del->setQuery('delete from ' . rex::getTablePrefix() . "article_slice where clang_id='" . $ep->getParam('clang')->getId() . "'");
});
} else {
rex_extension::register('FE_OUTPUT', function (rex_extension_point $ep) {
$content = $ep->getSubject();
$article = new rex_article_content();
$article->setCLang(rex_clang::getCurrentId());
if ($article->setArticleId(rex_article::getCurrentId())) {
$content .= $article->getArticleTemplate();