PHP 클래스 Sulu\Component\CustomUrl\Document\Subscriber\CustomUrlSubscriber

상속: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
파일 보기 프로젝트 열기: sulu/sulu

보호된 프로퍼티들

프로퍼티 타입 설명
$inspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector

공개 메소드들

메소드 설명
__construct ( Sulu\Component\CustomUrl\Generator\GeneratorInterface $generator, Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, Sulu\Component\DocumentManager\PathBuilder $pathBuilder, DocumentInspector $inspector, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager )
getSubscribedEvents ( )
handleHydrate ( Sulu\Component\DocumentManager\Event\HydrateEvent $event ) Set routes to custom-url.
handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event ) Creates routes for persisted custom-url.
handleRemove ( Sulu\Component\DocumentManager\Event\RemoveEvent $event ) Removes the routes for the given document.

보호된 메소드들

메소드 설명
createRoute ( string $domain, Sulu\Component\CustomUrl\Document\CustomUrlBehavior $document, Localization $locale, string $persistedLocale, string $routesPath ) : RouteDocument Create route-document for given domain.
findOrCreateRoute ( string $path, string $locale, Sulu\Component\CustomUrl\Document\CustomUrlBehavior $document, string $route ) : RouteDocument Find or create route-document for given path.
findReferrer ( $document, $webspaceKey ) : array Returns all route-document which referees given document.
getRoutesPath ( string $webspaceKey ) : string Return routes path for custom-url in given webspace.

메소드 상세

__construct() 공개 메소드

public __construct ( Sulu\Component\CustomUrl\Generator\GeneratorInterface $generator, Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, Sulu\Component\DocumentManager\PathBuilder $pathBuilder, DocumentInspector $inspector, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager )
$generator Sulu\Component\CustomUrl\Generator\GeneratorInterface
$documentManager Sulu\Component\DocumentManager\DocumentManagerInterface
$pathBuilder Sulu\Component\DocumentManager\PathBuilder
$inspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector
$webspaceManager Sulu\Component\Webspace\Manager\WebspaceManagerInterface

createRoute() 보호된 메소드

Create route-document for given domain.
protected createRoute ( string $domain, Sulu\Component\CustomUrl\Document\CustomUrlBehavior $document, Localization $locale, string $persistedLocale, string $routesPath ) : RouteDocument
$domain string
$document Sulu\Component\CustomUrl\Document\CustomUrlBehavior
$locale Sulu\Component\Localization\Localization
$persistedLocale string
$routesPath string
리턴 Sulu\Component\CustomUrl\Document\RouteDocument

findOrCreateRoute() 보호된 메소드

Find or create route-document for given path.
protected findOrCreateRoute ( string $path, string $locale, Sulu\Component\CustomUrl\Document\CustomUrlBehavior $document, string $route ) : RouteDocument
$path string
$locale string
$document Sulu\Component\CustomUrl\Document\CustomUrlBehavior
$route string
리턴 Sulu\Component\CustomUrl\Document\RouteDocument

findReferrer() 보호된 메소드

Returns all route-document which referees given document.
protected findReferrer ( $document, $webspaceKey ) : array
$document
$webspaceKey
리턴 array

getRoutesPath() 보호된 메소드

Return routes path for custom-url in given webspace.
protected getRoutesPath ( string $webspaceKey ) : string
$webspaceKey string
리턴 string

getSubscribedEvents() 공개 정적인 메소드

public static getSubscribedEvents ( )

handleHydrate() 공개 메소드

Set routes to custom-url.
public handleHydrate ( Sulu\Component\DocumentManager\Event\HydrateEvent $event )
$event Sulu\Component\DocumentManager\Event\HydrateEvent

handlePersist() 공개 메소드

Creates routes for persisted custom-url.
public handlePersist ( Sulu\Component\DocumentManager\Event\PersistEvent $event )
$event Sulu\Component\DocumentManager\Event\PersistEvent

handleRemove() 공개 메소드

Removes the routes for the given document.
public handleRemove ( Sulu\Component\DocumentManager\Event\RemoveEvent $event )
$event Sulu\Component\DocumentManager\Event\RemoveEvent

프로퍼티 상세

$inspector 보호되어 있는 프로퍼티

protected DocumentInspector,Sulu\Bundle\DocumentManagerBundle\Bridge $inspector
리턴 Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector