PHP Class Sulu\Bundle\ContentBundle\Serializer\Subscriber\StructureSubscriber

Inheritance: implements JMS\Serializer\EventDispatcher\EventSubscriberInterface
ファイルを表示 Open project: sulu/sulu

Public Methods

Method Description
__construct ( DocumentInspector $inspector )
getSubscribedEvents ( )
onPostSerialize ( JMS\Serializer\EventDispatcher\ObjectEvent $event ) Adds all the structure specific data (template, structure properties and breadcrumb) to the serialization.
onPreSerialize ( JMS\Serializer\EventDispatcher\PreSerializeEvent $event )

Private Methods

Method Description
addBreadcrumb ( Sulu\Component\Content\Document\Behavior\StructureBehavior $document, JMS\Serializer\VisitorInterface $visitor ) Adds the breadcrumb to the serialization.
addStructureProperties ( StructureMetadata $structureMetadata, Sulu\Component\Content\Document\Behavior\StructureBehavior $document, JMS\Serializer\VisitorInterface $visitor ) Adds the properties of the structure to the serialization.

Method Details

__construct() public method

public __construct ( DocumentInspector $inspector )
$inspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

onPostSerialize() public method

Adds all the structure specific data (template, structure properties and breadcrumb) to the serialization.
public onPostSerialize ( JMS\Serializer\EventDispatcher\ObjectEvent $event )
$event JMS\Serializer\EventDispatcher\ObjectEvent

onPreSerialize() public method

public onPreSerialize ( JMS\Serializer\EventDispatcher\PreSerializeEvent $event )
$event JMS\Serializer\EventDispatcher\PreSerializeEvent