Neos\ContentRepository\Domain\Model\NodeInterface::getNode PHP Method

getNode() public method

Returns a node specified by the given relative path.
public getNode ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface
$path string Path specifying the node, relative to this node
return Neos\ContentRepository\Domain\Model\NodeInterface The specified node or NULL if no such node exists
    public function getNode($path);

Usage Example

 /**
  * @test
  */
 public function moveAfterInPersonalWorkspaceDoesNotAffectLiveWorkspace()
 {
     // move "teaser" after "main/dummy42"
     $teaserTestWorkspace = $this->nodeInTestWorkspace->getNode('teaser');
     $teaserTestWorkspace->moveAfter($this->nodeInTestWorkspace->getNode('main/dummy42'));
     $this->assertNull($this->nodeInTestWorkspace->getNode('teaser/dummy42a'), 'moving not successful (1)');
     $this->assertNotNull($this->nodeInTestWorkspace->getNode('main/teaser/dummy42a'), 'moving not successful (2)');
     $this->assertNotNull($this->node->getNode('teaser'), 'moving shined through into live workspace (1)');
     $this->assertNotNull($this->node->getNode('teaser/dummy42a'), 'moving shined through into live workspace (2)');
     $this->assertNull($this->node->getNode('main/teaser/dummy42a'), 'moving shined through into live workspace (3)');
 }
All Usage Examples Of Neos\ContentRepository\Domain\Model\NodeInterface::getNode