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


PHP PageRepository::getPage方法代码示例

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


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

示例1: render

 /**
  * Retrieve page details from given page id
  *
  * @param integer $pageId
  * @param string $as
  * @return string Rendered string
  */
 public function render($pageId, $as = 'page')
 {
     $this->templateVariableContainer->add($as, $this->pageRepository->getPage($pageId));
     $output = $this->renderChildren();
     $this->templateVariableContainer->remove($as);
     return $output;
 }
开发者ID:dp-michaelhuebe,项目名称:my_user_management,代码行数:14,代码来源:PageInfoViewHelper.php

示例2: collectPages

 /**
  * return void
  */
 protected function collectPages()
 {
     $rootline = $this->pageRepository->getRootLine($GLOBALS['TSFE']->id);
     foreach ($rootline as $page) {
         $this->collectPage($this->pageRepository->getPage($page['uid']));
     }
     $this->generateUrlCollection();
 }
开发者ID:xnet74,项目名称:bk2k_collection,代码行数:11,代码来源:SitemapService.php

示例3: isGetPageHookCalled

 /**
  * Tests whether the getPage Hook is called correctly.
  *
  * @test
  */
 public function isGetPageHookCalled()
 {
     // Create a hook mock object
     $className = uniqid('tx_coretest');
     $getPageHookMock = $this->getMock('TYPO3\\CMS\\Frontend\\Page\\PageRepositoryGetPageHookInterface', array('getPage_preProcess'), array(), $className);
     // Register hook mock object
     $GLOBALS['T3_VAR']['getUserObj'][$className] = $getPageHookMock;
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPage'][] = $className;
     // Test if hook is called and register a callback method to check given arguments
     $getPageHookMock->expects($this->once())->method('getPage_preProcess')->will($this->returnCallback(array($this, 'isGetPagePreProcessCalledCallback')));
     $this->pageSelectObject->getPage(42, FALSE);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:17,代码来源:PageRepositoryTest.php

示例4: indexAction

 /**
  * renders the given theme
  *
  * @return void
  */
 public function indexAction()
 {
     $this->templateName = $this->evaluateTypoScript('plugin.tx_themes.settings.templateName');
     $templateFile = $this->getTemplateFile();
     if ($templateFile !== NULL) {
         $this->view->setTemplatePathAndFilename($templateFile);
     }
     $this->view->assign('templateName', $this->templateName);
     $this->view->assign('theme', $this->themeRepository->findByPageOrRootline($GLOBALS['TSFE']->id));
     $this->view->assign('page', $this->pageRepository->getPage($GLOBALS['TSFE']->id));
     $this->view->assign('data', $this->pageRepository->getPage($GLOBALS['TSFE']->id));
     $this->view->assign('TSFE', $GLOBALS['TSFE']);
 }
开发者ID:dkd,项目名称:themes,代码行数:18,代码来源:ThemeController.php

示例5: getPages

 /**
  * Get pages from Database
  *
  * @return array
  */
 private function getPages()
 {
     $rootPageId = $this->pluginConfig['1']['urlEntries.']['pages.']['rootPageId'];
     $rootPage = $this->pageRepo->getPage($rootPageId);
     $pages = $this->getSubPagesRecursive($rootPageId);
     return array_merge([$rootPage], $pages);
 }
开发者ID:IchHabRecht,项目名称:sitemap_generator,代码行数:12,代码来源:SitemapRepository.php

示例6: findByIdentifier

 protected function findByIdentifier($identifier)
 {
     $page = $this->pageRepository->getPage((int) $identifier);
     if (is_array($page) && isset($page['uid'])) {
         return $this->createDomainObject($page);
     }
     return null;
 }
开发者ID:r3h6,项目名称:TYPO3.EXT.error404page,代码行数:8,代码来源:PageRepository.php

示例7: resolveShortcutParentPage

 /**
  * Resolves shortcuts for the shortcut of type PageRepository::SHORTCUT_MODE_PARENT_PAGE.
  *
  * @param array $page
  * @param array $processedPages
  * @return array
  */
 private function resolveShortcutParentPage(array $page, array &$processedPages)
 {
     $page = $this->pageRepository->getPage($page['pid'], FALSE);
     if ($page && $page['doktype'] == PageRepository::DOKTYPE_SHORTCUT) {
         $page = $this->resolveShortcutProcess($page, $processedPages);
     }
     return $page;
 }
开发者ID:MaxServ,项目名称:typo3-realurl,代码行数:15,代码来源:EncodeDecoderBase.php

示例8: getPage

 /**
  * Wrapper for \TYPO3\CMS\Frontend\Page\PageRepository::getPage()
  *
  * @param integer $pageUid
  * @return array
  */
 public function getPage($pageUid = NULL)
 {
     if (NULL === $pageUid) {
         $pageUid = $GLOBALS['TSFE']->id;
     }
     if (FALSE === isset(self::$cachedPages[$pageUid])) {
         self::$cachedPages[$pageUid] = self::$pageSelect->getPage($pageUid);
     }
     return self::$cachedPages[$pageUid];
 }
开发者ID:smichaelsen,项目名称:vhs,代码行数:16,代码来源:PageSelectService.php

示例9: previewShowsPagesFromLiveAndCurrentWorkspace

 /**
  * @test
  */
 public function previewShowsPagesFromLiveAndCurrentWorkspace()
 {
     // initialization
     $wsid = 987654321;
     // simulate calls from tslib_fe->fetch_the_id()
     $this->pageSelectObject->versioningPreview = TRUE;
     $this->pageSelectObject->versioningWorkspaceId = $wsid;
     $this->pageSelectObject->init(FALSE);
     // check SQL created by t3lib_pageSelect->getPage()
     $GLOBALS['TYPO3_DB']->expects($this->once())->method('exec_SELECTquery')->with('*', 'pages', $this->stringContains('(pages.t3ver_wsid=0 or pages.t3ver_wsid=' . $wsid . ')'));
     $this->pageSelectObject->getPage(1);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:15,代码来源:PageRepositoryTest.php

示例10: canCacheUrl

 /**
  * Checks if the URL can be cached. This function may prevent RealURL cache
  * pollution with Solr or Indexed search URLs. Also some doktypes are ignored
  * for the cache.
  *
  * @param string $url
  * @return bool
  */
 protected function canCacheUrl($url)
 {
     $bannedUrlsRegExp = $this->configuration->get('cache/banUrlsRegExp');
     $result = !$bannedUrlsRegExp || !preg_match($bannedUrlsRegExp, $url);
     if ($result) {
         // Check page type: do not cache separators
         $pageRecord = $this->pageRepository->getPage($this->urlParameters['id']);
         if (is_array($pageRecord) && ($pageRecord['doktype'] == PageRepository::DOKTYPE_SPACER || $pageRecord['doktype'] == PageRepository::DOKTYPE_RECYCLER)) {
             $result = false;
         }
     }
     return $result;
 }
开发者ID:dmitryd,项目名称:typo3-realurl,代码行数:21,代码来源:UrlEncoder.php

示例11: indexAction

 /**
  * renders the given theme.
  *
  * @return void
  */
 public function indexAction()
 {
     $this->templateName = $this->evaluateTypoScript('plugin.tx_themes.settings.templateName');
     $templateFile = $this->getTemplateFile();
     if ($templateFile !== null) {
         $this->view->setTemplatePathAndFilename($templateFile);
     }
     $this->view->assign('templateName', $this->templateName);
     $frontendController = $this->getFrontendController();
     $this->view->assign('theme', $this->themeRepository->findByPageOrRootline($frontendController->id));
     // Get page data
     $pageArray = $this->pageRepository->getPage($frontendController->id);
     $pageArray['icon'] = '';
     // Map page icon
     if (isset($pageArray['tx_themes_icon']) && $pageArray['tx_themes_icon'] != '') {
         $setup = $frontendController->tmpl->setup;
         $pageArray['icon'] = $setup['lib.']['icons.']['cssMap.'][$pageArray['tx_themes_icon']];
     }
     $this->view->assign('page', $pageArray);
     $this->view->assign('data', $pageArray);
     $this->view->assign('TSFE', $frontendController);
 }
开发者ID:typo3-themes,项目名称:themes,代码行数:27,代码来源:ThemeController.php

示例12: previewShowsPagesFromLiveAndCurrentWorkspace

 /**
  * @test
  */
 public function previewShowsPagesFromLiveAndCurrentWorkspace()
 {
     // initialization
     $wsid = 987654321;
     $GLOBALS['TCA'] = array('pages' => $this->defaultTcaForPages);
     // simulate calls from \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->fetch_the_id()
     $this->pageSelectObject->versioningPreview = true;
     $this->pageSelectObject->versioningWorkspaceId = $wsid;
     $this->pageSelectObject->init(false);
     // check SQL created by \TYPO3\CMS\Frontend\Page\PageRepository->getPage()
     $GLOBALS['TYPO3_DB']->expects($this->at(2))->method('exec_SELECTgetSingleRow')->with('*', 'pages', $this->stringContains('(pages.t3ver_wsid=0 or pages.t3ver_wsid=' . $wsid . ')'));
     $this->pageSelectObject->getPage(1);
 }
开发者ID:hlop,项目名称:TYPO3.CMS,代码行数:16,代码来源:PageRepositoryTest.php

示例13: evaluateCondition

 /**
  * This method decides if the condition is TRUE or FALSE. It can be overriden in extending viewhelpers to adjust functionality.
  *
  * @param array $arguments ViewHelper arguments to evaluate the condition for this ViewHelper, allows for flexiblity in overriding this method.
  * @return bool
  */
 protected static function evaluateCondition($arguments = NULL)
 {
     $pageUid = $arguments['pageUid'];
     $respectSiteRoot = $arguments['respectSiteRoot'];
     if (NULL === $pageUid || TRUE === empty($pageUid) || 0 === intval($pageUid)) {
         $pageUid = $GLOBALS['TSFE']->id;
     }
     $pageSelect = new PageRepository();
     $page = $pageSelect->getPage($pageUid);
     if (TRUE === (bool) $respectSiteRoot && TRUE === isset($page['is_siteroot']) && TRUE === (bool) $page['is_siteroot']) {
         return FALSE;
     }
     return TRUE === isset($page['pid']) && 0 < $page['pid'];
 }
开发者ID:smichaelsen,项目名称:vhs,代码行数:20,代码来源:IsChildPageViewHelper.php

示例14: evaluateCondition

 /**
  * @param array $arguments
  * @return bool
  */
 protected static function evaluateCondition($arguments = null)
 {
     $pageUid = $arguments['pageUid'];
     $respectSiteRoot = $arguments['respectSiteRoot'];
     if (null === $pageUid || true === empty($pageUid) || 0 === intval($pageUid)) {
         $pageUid = $GLOBALS['TSFE']->id;
     }
     $pageSelect = new PageRepository();
     $page = $pageSelect->getPage($pageUid);
     if ($respectSiteRoot && isset($page['is_siteroot']) && $page['is_siteroot']) {
         return false;
     }
     return true === isset($page['pid']) && 0 < $page['pid'];
 }
开发者ID:fluidtypo3,项目名称:vhs,代码行数:18,代码来源:IsChildPageViewHelper.php

示例15: render

 /**
  * Render method
  *
  * @param integer $pageUid
  * @param boolean $respectSiteRoot
  * @return string
  */
 public function render($pageUid = NULL, $respectSiteRoot = FALSE)
 {
     if (NULL === $pageUid || TRUE === empty($pageUid) || 0 === intval($pageUid)) {
         $pageUid = $GLOBALS['TSFE']->id;
     }
     $pageSelect = new PageRepository();
     $page = $pageSelect->getPage($pageUid);
     if (TRUE === (bool) $respectSiteRoot && TRUE === isset($page['is_siteroot']) && TRUE === (bool) $page['is_siteroot']) {
         return $this->renderElseChild();
     }
     if (TRUE === isset($page['pid']) && 0 < $page['pid']) {
         return $this->renderThenChild();
     } else {
         return $this->renderElseChild();
     }
 }
开发者ID:JostBaron,项目名称:vhs,代码行数:23,代码来源:IsChildPageViewHelper.php


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