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


PHP NodeInterface::isHiddenInIndex方法代码示例

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


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

示例1: 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

示例2: collectTreeNodeData

 /**
  * @param \TYPO3\TYPO3CR\Domain\Model\NodeInterface $node
  * @param boolean $expand
  * @param array $children
  * @param string $contentTypeFilter
  * @return array
  */
 public function collectTreeNodeData(\TYPO3\TYPO3CR\Domain\Model\NodeInterface $node, $expand = TRUE, array $children = array())
 {
     $contentType = $node->getContentType()->getName();
     $classes = array(strtolower(str_replace(array('.', ':'), array('_', '-'), $contentType)));
     if ($node->isHidden() === TRUE) {
         array_push($classes, 'hidden');
     }
     if ($node->isHiddenInIndex() === TRUE) {
         array_push($classes, 'hiddenInIndex');
     }
     $uriBuilder = $this->controllerContext->getUriBuilder();
     $hasChildNodes = $children !== array() ? TRUE : FALSE;
     $contentType = $node->getContentType()->getName();
     $treeNode = array('key' => $node->getContextPath(), 'title' => $node->getContentType() === 'TYPO3.Phoenix.ContentTypes:Page' ? $node->getProperty('title') : $node->getLabel(), 'href' => $uriBuilder->reset()->setFormat('html')->setCreateAbsoluteUri(TRUE)->uriFor('show', array('node' => $node), 'Frontend\\Node', 'TYPO3.TYPO3', ''), 'isFolder' => $hasChildNodes, 'isLazy' => $hasChildNodes && !$expand, 'contentType' => $contentType, 'expand' => $expand, 'addClass' => implode(' ', $classes), 'name' => $node->getName());
     if ($hasChildNodes) {
         $treeNode['children'] = $children;
     }
     return $treeNode;
 }
开发者ID:radmiraal,项目名称:TYPO3.TYPO3,代码行数:26,代码来源:NodeView.php

示例3: collectTreeNodeData

 /**
  * @param NodeInterface $node
  * @param boolean $expand
  * @param array $children
  * @param boolean $hasChildNodes
  * @param boolean $matched
  * @return array
  */
 public function collectTreeNodeData(NodeInterface $node, $expand = TRUE, array $children = array(), $hasChildNodes = FALSE, $matched = FALSE)
 {
     $isTimedPage = FALSE;
     $now = new \DateTime();
     $now = $now->getTimestamp();
     $hiddenBeforeDateTime = $node->getHiddenBeforeDateTime();
     $hiddenAfterDateTime = $node->getHiddenAfterDateTime();
     if ($hiddenBeforeDateTime !== NULL && $hiddenBeforeDateTime->getTimestamp() > $now) {
         $isTimedPage = TRUE;
     }
     if ($hiddenAfterDateTime !== NULL) {
         $isTimedPage = TRUE;
     }
     $classes = array();
     if ($isTimedPage === TRUE && $node->isHidden() === FALSE) {
         array_push($classes, 'neos-timedVisibility');
     }
     if ($node->isHidden() === TRUE) {
         array_push($classes, 'neos-hidden');
     }
     if ($node->isHiddenInIndex() === TRUE) {
         array_push($classes, 'neos-hiddenInIndex');
     }
     if ($matched) {
         array_push($classes, 'neos-matched');
     }
     $uriBuilder = $this->controllerContext->getUriBuilder();
     $nodeType = $node->getNodeType();
     $nodeTypeConfiguration = $nodeType->getFullConfiguration();
     if ($node->getNodeType()->isOfType('TYPO3.Neos:Document')) {
         $uriForNode = $uriBuilder->reset()->setFormat('html')->setCreateAbsoluteUri(TRUE)->uriFor('show', array('node' => $node), 'Frontend\\Node', 'TYPO3.Neos');
     } else {
         $uriForNode = '#';
     }
     $label = $node->getLabel();
     $nodeTypeLabel = $node->getNodeType()->getLabel();
     $treeNode = array('key' => $node->getContextPath(), 'title' => $label, 'fullTitle' => $node->getProperty('title'), 'nodeTypeLabel' => $nodeTypeLabel, 'tooltip' => '', 'href' => $uriForNode, 'isFolder' => $hasChildNodes, 'isLazy' => $hasChildNodes && !$expand, 'nodeType' => $nodeType->getName(), 'isAutoCreated' => $node->isAutoCreated(), 'expand' => $expand, 'addClass' => implode(' ', $classes), 'name' => $node->getName(), 'iconClass' => isset($nodeTypeConfiguration['ui']) && isset($nodeTypeConfiguration['ui']['icon']) ? $nodeTypeConfiguration['ui']['icon'] : '', 'isHidden' => $node->isHidden());
     if ($hasChildNodes) {
         $treeNode['children'] = $children;
     }
     return $treeNode;
 }
开发者ID:radmiraal,项目名称:neos-development-collection,代码行数:50,代码来源:NodeView.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::isHiddenInIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。