src/Sulu/Bundle/PageBundle/Serializer/Subscriber/StructureSubscriber.php
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 ('title' === $name || !array_key_exists($name, $data) || $property->hasTag('sulu.rlp')) {
                continue;
            }

            $visitor->addData($name, $data[$name]);
        }
    }
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 ('title' === $name || !array_key_exists($name, $data) || $property->hasTag('sulu.rlp')) {
                continue;
            }

            $visitor->addData($name, $data[$name]);
        }
    }
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 ( 'title' === $ name || ! array_key_exists ( $ name , $ data ) || $ property -> hasTag ( 'sulu.rlp' ) ) { continue ; } $ visitor -> addData ( $ name , $ data [ $ name ] ) ; } }
Adds the properties of the structure to the serialization.

@param StructureBehavior $document
@param VisitorInterface $visitor
Adds the properties of the structure to the serialization .