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


PHP NodeInterface::isVisible方法代码示例

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


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

示例1: filterNodeByContext

 /**
  * Filter a node by the current context.
  * Will either return the node or NULL if it is not permitted in current context.
  *
  * @param NodeInterface $node
  * @param Context $context
  * @return \TYPO3\TYPO3CR\Domain\Model\Node|NULL
  */
 protected function filterNodeByContext(NodeInterface $node, Context $context)
 {
     if (!$context->isRemovedContentShown() && $node->isRemoved()) {
         return NULL;
     }
     if (!$context->isInvisibleContentShown() && !$node->isVisible()) {
         return NULL;
     }
     if (!$context->isInaccessibleContentShown() && !$node->isAccessible()) {
         return NULL;
     }
     return $node;
 }
开发者ID:radmiraal,项目名称:TYPO3.TYPO3CR,代码行数:21,代码来源:NodeFactory.php

示例2: isNodeHidden

 /**
  * Return TRUE/FALSE if the node is currently hidden or not in the menu; taking the "renderHiddenInIndex" configuration
  * of the Menu TypoScript object into account.
  *
  * This method needs to be called inside buildItems() in the subclasses.
  *
  * @param NodeInterface $node
  * @return boolean
  */
 protected function isNodeHidden(NodeInterface $node)
 {
     return $node->isVisible() === false || $this->getRenderHiddenInIndex() === false && $node->isHiddenInIndex() === true || $node->isAccessible() === false;
 }
开发者ID:robertlemke,项目名称:neos-development-collection,代码行数:13,代码来源:AbstractMenuImplementation.php

示例3: showWireframeAction

 /**
  * Shows the specified node and takes visibility and access restrictions into
  * account.
  *
  * @param \TYPO3\TYPO3CR\Domain\Model\NodeInterface $node
  * @return string View output for the specified node
  */
 public function showWireframeAction(\TYPO3\TYPO3CR\Domain\Model\NodeInterface $node)
 {
     if (!$node->isAccessible()) {
         try {
             $this->authenticationManager->authenticate();
         } catch (\Exception $exception) {
         }
     }
     if (!$node->isAccessible() && !$this->nodeRepository->getContext()->isInaccessibleContentShown()) {
         $this->throwStatus(403);
     }
     if (!$node->isVisible() && !$this->nodeRepository->getContext()->isInvisibleContentShown()) {
         $this->throwStatus(404);
     }
     if ($node->getContentType() === 'TYPO3.Phoenix.ContentTypes:Shortcut') {
         $this->view->assign('wireframeMode', $node);
     }
     $this->nodeRepository->getContext()->setCurrentNode($node);
     $this->view->assign('value', $node);
     $this->view->setTypoScriptPath('wireframeMode');
     $this->response->setHeader('Cache-Control', 'public, s-maxage=600', FALSE);
 }
开发者ID:radmiraal,项目名称:TYPO3.TYPO3,代码行数:29,代码来源:NodeController.php

示例4: isNodeHidden

 /**
  * Return TRUE/FALSE if the node is currently hidden or not in the menu; taking the "renderHiddenInIndex" configuration
  * of the Menu TypoScript object into account.
  *
  * This method needs to be called inside buildItems() in the subclasses.
  *
  * @param NodeInterface $node
  * @return boolean
  */
 protected function isNodeHidden(NodeInterface $node)
 {
     return $node->isVisible() === FALSE || $this->getRenderHiddenInIndex() === FALSE && $node->isHiddenInIndex() === TRUE || $node->isAccessible() === FALSE;
 }
开发者ID:radmiraal,项目名称:neos-development-collection,代码行数:13,代码来源:AbstractMenuImplementation.php


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