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

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

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

Метод Описание
__construct ( PropertyEncoder $encoder, DocumentInspector $inspector, Sulu\Component\DocumentManager\DocumentRegistry $registry )
getSubscribedEvents ( )
handleConfigureOptions ( Sulu\Component\DocumentManager\Event\ConfigureOptionsEvent $event )
handleHydrate ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event ) Update the locale to the shadow locale, if it is enabled.
handleMetadataLoad ( Sulu\Component\DocumentManager\Event\MetadataLoadEvent $event )
handlePersistUpdateUrl ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) If this is a shadow document, update the URL to that of the shadowed document.
saveShadowProperties ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event )

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

Метод Описание
getShadowLocale ( PHPCR\NodeInterface $node, $locale )
getShadowLocaleEnabled ( PHPCR\NodeInterface $node, $locale )
validateShadow ( Sulu\Component\Content\Document\Behavior\ShadowLocaleBehavior $document )

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

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

public __construct ( PropertyEncoder $encoder, DocumentInspector $inspector, Sulu\Component\DocumentManager\DocumentRegistry $registry )
$encoder Sulu\Bundle\DocumentManagerBundle\Bridge\PropertyEncoder
$inspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector
$registry Sulu\Component\DocumentManager\DocumentRegistry

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

public static getSubscribedEvents ( )

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

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

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

Note that this should happen before the fallback locale has been resolved
public handleHydrate ( Sulu\Component\DocumentManager\Event\AbstractMappingEvent $event )
$event Sulu\Component\DocumentManager\Event\AbstractMappingEvent

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

public handleMetadataLoad ( Sulu\Component\DocumentManager\Event\MetadataLoadEvent $event )
$event Sulu\Component\DocumentManager\Event\MetadataLoadEvent

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

TODO: This is about caching and should be handled somewhere else.
public handlePersistUpdateUrl ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

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

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