findByPathWithoutReduce() публичный Метод

Internal method, used by Node::setPath
public findByPathWithoutReduce ( string $path, Workspace $workspace, boolean $includeRemovedNodes = false, boolean $recursive = false ) : array
$path string
$workspace Neos\ContentRepository\Domain\Model\Workspace
$includeRemovedNodes boolean Should removed nodes be included in the result (defaults to FALSE)
$recursive boolean
Результат array
 /**
  * Tests addPathConstraintToQueryBuilder, see https://jira.neos.io/browse/NEOS-1849
  *
  * @test
  */
 public function findByPathWithoutReduceLimitsToRootNodeCorrectly()
 {
     $this->setUpNodes();
     $workspace = $this->context->getWorkspace();
     $foundNodes = $this->nodeDataRepository->findByPathWithoutReduce('/', $workspace, false, true);
     $this->assertCount(7, $foundNodes);
 }
Пример #2
0
 /**
  * Moves a node and sub nodes to the new path given with special logic for aggregate node types.
  *
  * @param string $destinationPath the new node path
  * @param boolean $recursiveCall is this a recursive call
  * @return array of arrays with NodeVariant and old and new path and if this was a recursive call
  */
 protected function setPathInternalForAggregate($destinationPath, $recursiveCall)
 {
     $originalPath = $this->nodeData->getPath();
     $nodeDataVariantsAndChildren = $this->nodeDataRepository->findByPathWithoutReduce($originalPath, $this->context->getWorkspace(), true, true);
     $changedNodePathsCollection = array_map(function ($nodeData) use($destinationPath, $originalPath, $recursiveCall) {
         return $this->moveNodeData($nodeData, $originalPath, $destinationPath, $recursiveCall);
     }, $nodeDataVariantsAndChildren);
     return array_filter($changedNodePathsCollection);
 }