PHP Класс Sulu\Component\CustomUrl\Document\Subscriber\CustomUrlSubscriber

Наследование: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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