loadByNode() public method

returns the data for the given node.
public loadByNode ( PHPCR\NodeInterface $contentNode, $localization, string $webspaceKey = null, boolean $excludeGhost = true, boolean $loadGhostContent = false, boolean $excludeShadow = true )
$contentNode PHPCR\NodeInterface The node for which to load the data
$webspaceKey string Key of the webspace
$excludeGhost boolean Do not return Ghost structures (return null instead)
$loadGhostContent boolean Load ghost content
$excludeShadow boolean Do not return shadow structures (return null instead)
Ejemplo n.º 1
0
 public function testGetReferencedUuids()
 {
     $pageNode = $this->session->getNode('/cmf/sulu_io/contents/hotels');
     $pageStructure = $this->contentMapper->loadByNode($pageNode, 'en', 'sulu_io', true, false, false);
     $property = $pageStructure->getProperty('hotels');
     $uuids = $this->contentType->getReferencedUuids($property);
     $this->assertCount(2, $uuids);
     foreach ($uuids as $uuid) {
         $this->assertTrue(UUIDHelper::isUuid($uuid));
     }
 }