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


PHP NodeDataRepository::findOnPath方法代码示例

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


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

示例1: getNodesOnPath

 /**
  * Finds all nodes lying on the path specified by (and including) the given
  * starting point and end point.
  *
  * @param mixed $startingPoint Either an absolute path or an actual node specifying the starting point, for example /sites/mysite.com/
  * @param mixed $endPoint Either an absolute path or an actual node specifying the end point, for example /sites/mysite.com/homepage/subpage
  * @return array<\TYPO3\TYPO3CR\Domain\Model\NodeInterface> The nodes found between and including the given paths or an empty array of none were found
  * @api
  */
 public function getNodesOnPath($startingPoint, $endPoint)
 {
     $startingPointPath = $startingPoint instanceof \TYPO3\TYPO3CR\Domain\Model\NodeInterface ? $startingPoint->getPath() : $startingPoint;
     $endPointPath = $endPoint instanceof \TYPO3\TYPO3CR\Domain\Model\NodeInterface ? $endPoint->getPath() : $endPoint;
     $nodeDataElements = $this->nodeDataRepository->findOnPath($startingPointPath, $endPointPath, $this->getWorkspace(), $this->getDimensions(), $this->isRemovedContentShown());
     $nodes = array();
     foreach ($nodeDataElements as $nodeData) {
         $node = $this->nodeFactory->createFromNodeData($nodeData, $this);
         if ($node !== NULL) {
             $nodes[] = $node;
         }
     }
     return $nodes;
 }
开发者ID:radmiraal,项目名称:TYPO3.TYPO3CR,代码行数:23,代码来源:Context.php

示例2: getNodesOnPath

 /**
  * Finds all nodes lying on the path specified by (and including) the given
  * starting point and end point.
  *
  * @param mixed $startingPoint Either an absolute path or an actual node specifying the starting point, for example /sites/mysitecom
  * @param mixed $endPoint Either an absolute path or an actual node specifying the end point, for example /sites/mysitecom/homepage/subpage
  * @return array<\TYPO3\TYPO3CR\Domain\Model\NodeInterface> The nodes found between and including the given paths or an empty array of none were found
  * @api
  */
 public function getNodesOnPath($startingPoint, $endPoint)
 {
     $startingPointPath = $startingPoint instanceof NodeInterface ? $startingPoint->getPath() : $startingPoint;
     $endPointPath = $endPoint instanceof NodeInterface ? $endPoint->getPath() : $endPoint;
     $nodeDataElements = $this->nodeDataRepository->findOnPath($startingPointPath, $endPointPath, $this->getWorkspace(), $this->getDimensions(), $this->isRemovedContentShown());
     $nodes = array();
     foreach ($nodeDataElements as $nodeData) {
         $node = $this->nodeFactory->createFromNodeData($nodeData, $this);
         if ($node !== null) {
             $nodes[] = $node;
             $this->firstLevelNodeCache->setByPath($node->getPath(), $node);
         }
     }
     return $nodes;
 }
开发者ID:mgoldbeck,项目名称:neos-development-collection,代码行数:24,代码来源:Context.php


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