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

Otherwise FALSE is returned.
public getByPath ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface
$path string
Результат Neos\ContentRepository\Domain\Model\NodeInterface
Пример #1
0
 /**
  * Returns a node specified by the given absolute path.
  *
  * @param string $path Absolute path specifying the node
  * @return NodeInterface The specified node or NULL if no such node exists
  * @throws \InvalidArgumentException
  * @api
  */
 public function getNode($path)
 {
     if (!is_string($path) || $path[0] !== '/') {
         throw new \InvalidArgumentException('Only absolute paths are allowed for Context::getNode()', 1284975105);
     }
     $path = strtolower($path);
     $workspaceRootNode = $this->getWorkspace()->getRootNodeData();
     $rootNode = $this->nodeFactory->createFromNodeData($workspaceRootNode, $this);
     if ($path !== '/') {
         $node = $this->firstLevelNodeCache->getByPath($path);
         if ($node === false) {
             $node = $rootNode->getNode(substr($path, 1));
             $this->firstLevelNodeCache->setByPath($path, $node);
         }
     } else {
         $node = $rootNode;
     }
     return $node;
 }