Example #1
0
 /**
  * Returns a node specified by the given relative path.
  *
  * @param string $path Path specifying the node, relative to this node
  * @return \TYPO3\TYPO3CR\Domain\Model\NodeInterface The specified node or NULL if no such node exists
  * @api
  */
 public function getNode($path)
 {
     $absolutePath = $this->nodeData->normalizePath($path);
     $node = $this->context->getFirstLevelNodeCache()->getByPath($absolutePath);
     if ($node !== FALSE) {
         return $node;
     }
     $node = $this->nodeDataRepository->findOneByPathInContext($absolutePath, $this->context);
     $this->context->getFirstLevelNodeCache()->setByPath($absolutePath, $node);
     return $node;
 }