getStructure() 공개 메소드

Return the StructureInterface instance.
public getStructure ( ) : Sulu\Component\Content\Document\Structure\StructureInterface
리턴 Sulu\Component\Content\Document\Structure\StructureInterface
예제 #1
0
 /**
  * Adds the properties of the structure to the serialization.
  *
  * @param StructureBehavior $document
  * @param VisitorInterface $visitor
  */
 private function addStructureProperties(StructureMetadata $structureMetadata, StructureBehavior $document, VisitorInterface $visitor)
 {
     /** @var ManagedStructure $structure */
     $structure = $document->getStructure();
     $data = $structure->toArray();
     foreach ($structureMetadata->getProperties() as $name => $property) {
         if ($name === 'title' || !array_key_exists($name, $data) || $property->hasTag('sulu.rlp')) {
             continue;
         }
         $visitor->addData($name, $data[$name]);
     }
 }