PHP Класс Sulu\Component\Content\Document\Subscriber\StructureSubscriber

Наследование: extends Sulu\Component\Content\Document\Subscriber\AbstractMappingSubscriber
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Sulu\Component\DocumentManager\PropertyEncoder $encoder, Sulu\Component\Content\ContentTypeManagerInterface $contentTypeManager, DocumentInspector $inspector, LegacyPropertyFactory $legacyPropertyFactory, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager, array $defaultTypes )
configureOptions ( Sulu\Component\DocumentManager\Event\ConfigureOptionsEvent $event )
getSubscribedEvents ( )
handleHydrate ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event )
handlePersistStagedProperties ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Commit the properties, which are only staged on the structure yet.
handlePersistStructureType ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Set the structure type early so that subsequent subscribers operate upon the correct structure type.
saveStructureData ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event )

Приватные методы

Метод Описание
createStructure ( mixed $document ) : ManagedStructure
getDefaultStructureType ( Sulu\Component\Content\Document\Behavior\StructureBehavior $document ) : string Return the default structure for the given StructureBehavior implementing document.
getDefaultStructureTypeFromConfig ( string $alias ) : string Returns configured "default_type".
getStructure ( object $document, string $structureType, boolean $rehydrate ) : Sulu\Component\Content\Document\Structure\StructureInterface Return the a structure for the document.
getStructureTypePropertyName ( $document, $locale )
mapContentToNode ( mixed $document, PHPCR\NodeInterface $node, string $locale, boolean $ignoreRequired ) Map to the content properties to the node using the content types.
supportsBehavior ( $document )

Описание методов

__construct() публичный Метод

public __construct ( Sulu\Component\DocumentManager\PropertyEncoder $encoder, Sulu\Component\Content\ContentTypeManagerInterface $contentTypeManager, DocumentInspector $inspector, LegacyPropertyFactory $legacyPropertyFactory, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager, array $defaultTypes )
$encoder Sulu\Component\DocumentManager\PropertyEncoder
$contentTypeManager Sulu\Component\Content\ContentTypeManagerInterface
$inspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector
$legacyPropertyFactory Sulu\Component\Content\Compat\Structure\LegacyPropertyFactory
$webspaceManager Sulu\Component\Webspace\Manager\WebspaceManagerInterface
$defaultTypes array

configureOptions() публичный Метод

public configureOptions ( Sulu\Component\DocumentManager\Event\ConfigureOptionsEvent $event )
$event Sulu\Component\DocumentManager\Event\ConfigureOptionsEvent

getSubscribedEvents() публичный статический Метод

public static getSubscribedEvents ( )

handleHydrate() публичный Метод

public handleHydrate ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event )
$event Sulu\Component\DocumentManager\Event\AbstractMappingEvent

handlePersistStagedProperties() публичный Метод

Commit the properties, which are only staged on the structure yet.
public handlePersistStagedProperties ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

handlePersistStructureType() публичный Метод

Set the structure type early so that subsequent subscribers operate upon the correct structure type.
public handlePersistStructureType ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

saveStructureData() публичный Метод

public saveStructureData ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event )
$event Sulu\Component\DocumentManager\Event\AbstractMappingEvent