Finds a single node by its parent and (optionally) by its node type
public findFirstByParentAndNodeTypeInContext ( string $parentPath, string $nodeTypeFilter, |
||
$parentPath | string | Absolute path of the parent node |
$nodeTypeFilter | string | Filter the node type of the nodes, allows complex expressions (e.g. "Neos.Neos:Page", "!Neos.Neos:Page,Neos.Neos:Text" or NULL) |
$context | The containing context | |
리턴 | The node found or NULL |
/** * Returns the primary child node of this node. * * Which node acts as a primary child node will in the future depend on the * node type. For now it is just the first child node. * * @return Node The primary child node or NULL if no such node exists * @api */ public function getPrimaryChildNode() { return $this->nodeDataRepository->findFirstByParentAndNodeTypeInContext($this->getPath(), null, $this->context); }