当前位置: 首页>>代码示例>>PHP>>正文


PHP PageManager::resolvePage方法代码示例

本文整理汇总了PHP中PageManager::resolvePage方法的典型用法代码示例。如果您正苦于以下问题:PHP PageManager::resolvePage方法的具体用法?PHP PageManager::resolvePage怎么用?PHP PageManager::resolvePage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PageManager的用法示例。


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

示例1: insertBreadcrumbsUsingPageIdentifier

 public function insertBreadcrumbsUsingPageIdentifier($page_id, $preserve_last = true)
 {
     if ($page_id == 0) {
         return parent::insertBreadcrumbs(array(Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/')));
     }
     $pages = PageManager::resolvePage($page_id, 'handle');
     foreach ($pages as &$page) {
         // If we are viewing the Page Editor, the Breadcrumbs should link
         // to the parent's Page Editor.
         if ($this->_context[0] == 'edit') {
             $page = Widget::Anchor(PageManager::fetchTitleFromHandle($page), SYMPHONY_URL . '/blueprints/pages/edit/' . PageManager::fetchIDFromHandle($page) . '/');
             // If the pages index is nested, the Breadcrumb should link to the
             // Pages Index filtered by parent
         } elseif (Symphony::Configuration()->get('pages_table_nest_children', 'symphony') == 'yes') {
             $page = Widget::Anchor(PageManager::fetchTitleFromHandle($page), SYMPHONY_URL . '/blueprints/pages/?parent=' . PageManager::fetchIDFromHandle($page));
             // If there is no nesting on the Pages Index, the breadcrumb is
             // not a link, just plain text
         } else {
             $page = new XMLElement('span', PageManager::fetchTitleFromHandle($page));
         }
     }
     if (!$preserve_last) {
         array_pop($pages);
     }
     parent::insertBreadcrumbs(array_merge(array(Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/')), $pages));
 }
开发者ID:rc1,项目名称:WebAppsWithCmsStartHere,代码行数:26,代码来源:content.blueprintspages.php

示例2: grab

 /**
  *
  * Method called by Symphony in order to build the
  * @param $param_pool
  * @return XMLElement
  */
 public function grab(&$param_pool)
 {
     // get the current page id
     $current_page_id = (int) $this->_env['param']['current-page-id'];
     // prepare output
     $result = new XMLElement($this->dsParamROOTELEMENT);
     // if multilangual extensions are enabled
     if ($this->isMultiLangual) {
         // current language
         $lang = LanguageRedirect::instance()->getLanguageCode();
     }
     // get current page title including all parents
     $titles = PageManager::resolvePage($current_page_id, isset($lang) ? 'page_lhandles_t_' . $lang : 'title');
     // get current page path including all parents
     $handles = PageManager::resolvePage($current_page_id, isset($lang) ? 'page_lhandles_h_' . $lang : 'handle');
     // generate the output
     foreach ($titles as $key => $title) {
         $path = implode('/', array_slice($handles, 0, $key + 1));
         $result->appendChild(new XMLElement('page', $title, array('path' => $path)));
     }
     // return xml result set
     return $result;
 }
开发者ID:strangerpixel,项目名称:breadcrumb,代码行数:29,代码来源:data.breadcrumb.php

示例3: resolvePagePath

 /**
  * Given the `$page_id`, return the complete path to the
  * current page.
  *
  * @deprecated This function will be removed in Symphony 2.4. Use
  * `PageManager::resolvePagePath` instead.
  * @param mixed $page_id
  * The ID of the Page that currently being viewed, or the handle of the
  * current Page
  * @return string
  *  The complete path to the current Page including any parent
  *  Pages, ie. /articles/read
  */
 public function resolvePagePath($page_id)
 {
     return PageManager::resolvePage($page_id, 'handle');
 }
开发者ID:readona,项目名称:symphonyno5,代码行数:17,代码来源:class.symphony.php

示例4: resolvePagePath

 /**
  * Given the `$page_id`, return the complete path to the
  * current page. Each part of the Page's path will be
  * separated by '/'.
  *
  * @param mixed $page_id
  *  The ID of the Page that currently being viewed, or the handle of the
  *  current Page
  * @return string
  *  The complete path to the current Page including any parent
  *  Pages, ie. /articles/read
  */
 public static function resolvePagePath($page_id)
 {
     $path = PageManager::resolvePage($page_id, 'handle');
     return implode('/', $path);
 }
开发者ID:nickdunn,项目名称:elasticsearch-surfin-shakespeare,代码行数:17,代码来源:class.pagemanager.php


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