assignNodeAndChildNodes() public méthode

Prepares this view to render a list or tree of given node including child nodes.
public assignNodeAndChildNodes ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $nodeTypeFilter = '', integer $depth, Neos\ContentRepository\Domain\Model\NodeInterface $untilNode = null ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface The node to fetch child nodes of
$nodeTypeFilter string Criteria for filtering the child nodes
$depth integer How many levels of childNodes (0 = unlimited)
$untilNode Neos\ContentRepository\Domain\Model\NodeInterface if given, expand all nodes on the rootline towards $untilNode, no matter what is defined with $depth.
Résultat void
Exemple #1
0
 /**
  * Creates a new node and returns tree structure
  *
  * @param Node $referenceNode
  * @param array $nodeData
  * @param string $position where the node should be added, -1 is before, 0 is in, 1 is after
  * @param string $nodeTypeFilter
  * @return void
  */
 public function createNodeForTheTreeAction(Node $referenceNode, array $nodeData, $position, $nodeTypeFilter = '')
 {
     $newNode = $this->nodeOperations->create($referenceNode, $nodeData, $position);
     $this->view->assignNodeAndChildNodes($newNode, $nodeTypeFilter);
 }