class NodeRouter extends Router implements VersatileGeneratorInterface (View source)

Properties

protected $em
protected $stopwatch
protected bool $preview

Methods

__construct(EntityManager $em, ThemeResolver $themeResolver, Settings $settingsBag, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, Stopwatch $stopwatch = null, bool $preview = false)

NodeRouter constructor.

getRouteCollection()

[email protected]}

CacheProvider
setNodeSourceUrlCacheProvider(CacheProvider $nodeSourceUrlCacheProvider)

No description

UrlMatcherInterface
getMatcher()

Gets the UrlMatcher instance associated with this Router.

null
getGenerator()

No generator for a node router.

bool
supports(mixed $name)

Whether this generator supports the supplied $name.

string
getRouteDebugMessage(mixed $name, array $parameters = [])

Convert a route identifier (name, content object etc) into a string usable for logging and other debug/error messages

generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)

[email protected]}

string
getResourcePath(NodesSources $source)

No description

Details

__construct(EntityManager $em, ThemeResolver $themeResolver, Settings $settingsBag, array $options = [], RequestContext $context = null, LoggerInterface $logger = null, Stopwatch $stopwatch = null, bool $preview = false)

NodeRouter constructor.

Parameters

EntityManager $em
ThemeResolver $themeResolver
Settings $settingsBag
array $options
RequestContext $context
LoggerInterface $logger
Stopwatch $stopwatch
bool $preview

getRouteCollection()

[email protected]}

CacheProvider getNodeSourceUrlCacheProvider()

Return Value

CacheProvider

setNodeSourceUrlCacheProvider(CacheProvider $nodeSourceUrlCacheProvider)

Parameters

CacheProvider $nodeSourceUrlCacheProvider

UrlMatcherInterface getMatcher()

Gets the UrlMatcher instance associated with this Router.

Return Value

UrlMatcherInterface A UrlMatcherInterface instance

null getGenerator()

No generator for a node router.

Return Value

null

bool supports(mixed $name)

Whether this generator supports the supplied $name.

This check does not need to look if the specific instance can be resolved to a route, only whether the router can generate routes from objects of this class.

Parameters

mixed $name The route "name" which may also be an object or anything

Return Value

bool

string getRouteDebugMessage(mixed $name, array $parameters = [])

Convert a route identifier (name, content object etc) into a string usable for logging and other debug/error messages

Parameters

mixed $name
array $parameters which should contain a content field containing a RouteReferrersReadInterface object

Return Value

string

generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)

[email protected]}

Parameters

$name
$parameters
$referenceType

protected string getResourcePath(NodesSources $source)

Parameters

NodesSources $source

Return Value

string