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

Otherwise FALSE is returned.
public getByIdentifier ( string $identifier ) : Neos\ContentRepository\Domain\Model\NodeInterface | boolean
$identifier string
Результат Neos\ContentRepository\Domain\Model\NodeInterface | boolean
Пример #1
0
 /**
  * Get a node by identifier and this context
  *
  * @param string $identifier The identifier of a node
  * @return NodeInterface The node with the given identifier or NULL if no such node exists
  */
 public function getNodeByIdentifier($identifier)
 {
     $node = $this->firstLevelNodeCache->getByIdentifier($identifier);
     if ($node !== false) {
         return $node;
     }
     $nodeData = $this->nodeDataRepository->findOneByIdentifier($identifier, $this->getWorkspace(), $this->dimensions);
     if ($nodeData !== null) {
         $node = $this->nodeFactory->createFromNodeData($nodeData, $this);
     } else {
         $node = null;
     }
     $this->firstLevelNodeCache->setByIdentifier($identifier, $node);
     return $node;
 }