PHP 클래스 Sulu\Component\Content\Document\Subscriber\ShadowLocaleSubscriber

상속: extends Sulu\Component\Content\Document\Subscriber\AbstractMappingSubscriber
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

공개 메소드들

메소드 설명
__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