PHP Class Sulu\Component\CustomUrl\Manager\CustomUrlManager

Inheritance: implements Sulu\Component\CustomUrl\Manager\CustomUrlManagerInterface
Show file Open project: sulu/sulu

Public Methods

Method Description
__construct ( Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, CustomUrlRepository $customUrlRepository, Sulu\Component\DocumentManager\MetadataFactoryInterface $metadataFactory, Sulu\Component\DocumentManager\PathBuilder $pathBuilder, Sulu\Component\HttpCache\HandlerInvalidatePathInterface $cacheHandler )
create ( $webspaceKey, array $data, $locale = null )
delete ( $uuid )
deleteRoute ( $webspaceKey, $uuid )
find ( $uuid, $locale = null )
findByPage ( Sulu\Component\DocumentManager\Behavior\Mapping\UuidBehavior $page )
findByUrl ( $url, $webspaceKey, $locale = null )
findList ( $webspaceKey, $locale )
findRouteByUrl ( $url, $webspaceKey, $locale = null )
findUrls ( $webspaceKey )
invalidate ( CustomUrlDocument $document )
invalidateRoute ( $webspaceKey, RouteDocument $routeDocument )
save ( $uuid, array $data, $locale = null )

Protected Methods

Method Description
findRoute ( string $uuid ) : RouteDocument Read route of custom-url identified by uuid.

Private Methods

Method Description
bind ( CustomUrlDocument $document, array $data, string $locale ) Bind data array to given document.
getItemsPath ( $webspaceKey ) : string Returns path to custom-url documents.
getRoutesPath ( $webspaceKey ) : string Returns base path to custom-url routes.

Method Details

__construct() public method

public __construct ( Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, CustomUrlRepository $customUrlRepository, Sulu\Component\DocumentManager\MetadataFactoryInterface $metadataFactory, Sulu\Component\DocumentManager\PathBuilder $pathBuilder, Sulu\Component\HttpCache\HandlerInvalidatePathInterface $cacheHandler )
$documentManager Sulu\Component\DocumentManager\DocumentManagerInterface
$customUrlRepository Sulu\Component\CustomUrl\Repository\CustomUrlRepository
$metadataFactory Sulu\Component\DocumentManager\MetadataFactoryInterface
$pathBuilder Sulu\Component\DocumentManager\PathBuilder
$cacheHandler Sulu\Component\HttpCache\HandlerInvalidatePathInterface

create() public method

public create ( $webspaceKey, array $data, $locale = null )
$data array

delete() public method

public delete ( $uuid )

deleteRoute() public method

public deleteRoute ( $webspaceKey, $uuid )

find() public method

public find ( $uuid, $locale = null )

findByPage() public method

public findByPage ( Sulu\Component\DocumentManager\Behavior\Mapping\UuidBehavior $page )
$page Sulu\Component\DocumentManager\Behavior\Mapping\UuidBehavior

findByUrl() public method

public findByUrl ( $url, $webspaceKey, $locale = null )

findList() public method

public findList ( $webspaceKey, $locale )

findRoute() protected method

Read route of custom-url identified by uuid.
protected findRoute ( string $uuid ) : RouteDocument
$uuid string
return Sulu\Component\CustomUrl\Document\RouteDocument

findRouteByUrl() public method

public findRouteByUrl ( $url, $webspaceKey, $locale = null )

findUrls() public method

public findUrls ( $webspaceKey )

invalidate() public method

public invalidate ( CustomUrlDocument $document )
$document Sulu\Component\CustomUrl\Document\CustomUrlDocument

invalidateRoute() public method

public invalidateRoute ( $webspaceKey, RouteDocument $routeDocument )
$routeDocument Sulu\Component\CustomUrl\Document\RouteDocument

save() public method

public save ( $uuid, array $data, $locale = null )
$data array