PHP 클래스 Sulu\Bundle\WebsiteBundle\Routing\ContentRouteProvider

상속: implements Symfony\Cmf\Component\Routing\RouteProviderInterface
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, DocumentInspector $documentInspector, Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface $resourceLocatorStrategyPool, Sulu\Component\Content\Compat\StructureManagerInterface $structureManager, Sulu\Component\Webspace\Analyzer\RequestAnalyzerInterface $requestAnalyzer, Sulu\Bundle\WebsiteBundle\Locale\DefaultLocaleProviderInterface $defaultLocaleProvider, Sulu\Component\Webspace\Url\ReplacerInterface $urlReplacer )
getRouteByName ( string $name, array $parameters = [] ) : Symfony\Component\Routing\Route Find the route using the provided route name.
getRouteCollectionForRequest ( Request $request ) : RouteCollection Finds the correct route for the current request.
getRoutesByNames ( array $names, array $parameters = [] ) : Symfony\Component\Routing\Route[] Find many routes by their names using the provided list of names.

보호된 메소드들

메소드 설명
getRedirectRoute ( Request $request, $url ) : Symfony\Component\Routing\Route
getRedirectWebSpaceRoute ( ) : Symfony\Component\Routing\Route
getStructureRoute ( Request $request, PageBridge $content ) : Symfony\Component\Routing\Route
getUrlWithoutEndingTrailingSlash ( $resourceLocator ) : string

비공개 메소드들

메소드 설명
checkResourceLocator ( ) : boolean Checks if the resource locator is valid.

메소드 상세

__construct() 공개 메소드

public __construct ( Sulu\Component\DocumentManager\DocumentManagerInterface $documentManager, DocumentInspector $documentInspector, Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface $resourceLocatorStrategyPool, Sulu\Component\Content\Compat\StructureManagerInterface $structureManager, Sulu\Component\Webspace\Analyzer\RequestAnalyzerInterface $requestAnalyzer, Sulu\Bundle\WebsiteBundle\Locale\DefaultLocaleProviderInterface $defaultLocaleProvider, Sulu\Component\Webspace\Url\ReplacerInterface $urlReplacer )
$documentManager Sulu\Component\DocumentManager\DocumentManagerInterface
$documentInspector Sulu\Bundle\DocumentManagerBundle\Bridge\DocumentInspector
$resourceLocatorStrategyPool Sulu\Component\Content\Types\ResourceLocator\Strategy\ResourceLocatorStrategyPoolInterface
$structureManager Sulu\Component\Content\Compat\StructureManagerInterface
$requestAnalyzer Sulu\Component\Webspace\Analyzer\RequestAnalyzerInterface
$defaultLocaleProvider Sulu\Bundle\WebsiteBundle\Locale\DefaultLocaleProviderInterface
$urlReplacer Sulu\Component\Webspace\Url\ReplacerInterface

getRedirectRoute() 보호된 메소드

protected getRedirectRoute ( Request $request, $url ) : Symfony\Component\Routing\Route
$request Symfony\Component\HttpFoundation\Request
$url
리턴 Symfony\Component\Routing\Route

getRedirectWebSpaceRoute() 보호된 메소드

protected getRedirectWebSpaceRoute ( ) : Symfony\Component\Routing\Route
리턴 Symfony\Component\Routing\Route

getRouteByName() 공개 메소드

Find the route using the provided route name.
public getRouteByName ( string $name, array $parameters = [] ) : Symfony\Component\Routing\Route
$name string the route name to fetch
$parameters array DEPRECATED the parameters as they are passed to the UrlGeneratorInterface::generate call
리턴 Symfony\Component\Routing\Route

getRouteCollectionForRequest() 공개 메소드

It loads the correct data with the content mapper.
public getRouteCollectionForRequest ( Request $request ) : RouteCollection
$request Symfony\Component\HttpFoundation\Request A request against which to match
리턴 Symfony\Component\Routing\RouteCollection with all Routes that could potentially match $request. Empty collection if nothing can match

getRoutesByNames() 공개 메소드

Note that this method may not throw an exception if some of the routes are not found or are not actually Route instances. It will just return the list of those Route instances it found. This method exists in order to allow performance optimizations. The simple implementation could be to just repeatedly call $this->getRouteByName() while catching and ignoring eventual exceptions.
public getRoutesByNames ( array $names, array $parameters = [] ) : Symfony\Component\Routing\Route[]
$names array the list of names to retrieve
$parameters array DEPRECATED the parameters as they are passed to the UrlGeneratorInterface::generate call. (Only one array, not one for each entry in $names
리턴 Symfony\Component\Routing\Route[] iterable thing with the keys the names of the $names argument

getStructureRoute() 보호된 메소드

protected getStructureRoute ( Request $request, PageBridge $content ) : Symfony\Component\Routing\Route
$request Symfony\Component\HttpFoundation\Request
$content Sulu\Component\Content\Compat\Structure\PageBridge
리턴 Symfony\Component\Routing\Route

getUrlWithoutEndingTrailingSlash() 보호된 메소드

protected getUrlWithoutEndingTrailingSlash ( $resourceLocator ) : string
$resourceLocator
리턴 string