CoolCMS API

RouteTableBuilder
in package

FinalYes

Builds the complete {@see RouteTableSnapshot} from the database.

It reads three sets, each with a single findAll():

This is the only data path: the builder runs even with the cache disabled and the cache only wraps it, so the two cannot drift apart. The presenter existence check runs only here; running it per request would log a warning for every dead route.

Table of Contents

Properties

$localizationManager  : LocalizationManager
$pageManager  : PageManager
$routeManager  : RouteManager

Methods

__construct()  : mixed
build()  : RouteTableSnapshot
Builds the complete snapshot from the database.
buildLocaleMap()  : array{0: array, 1: string}
buildRouteDefinitions()  : array<int, RouteDefinition>
buildSlugMaps()  : array{0: array>, 1: array>}
Builds both slug maps explicitly (no flipping), identical to `PageSlugTranslator::warmupFromEntities()` including the skip of translations without `href`. Pages are read separately because the route graph does not cover pages without a route.
extractPageIds()  : array<int, int>
Returns the whitelisted page ids from the M2M `page_route_rel` relation.

Properties

Methods

buildLocaleMap()

private buildLocaleMap() : array{0: array, 1: string}
Return values
array{0: array, 1: string} —

[locale] = languageId, and the key of the main localization (localizations.main; cs when none is marked)

buildSlugMaps()

Builds both slug maps explicitly (no flipping), identical to `PageSlugTranslator::warmupFromEntities()` including the skip of translations without `href`. Pages are read separately because the route graph does not cover pages without a route.

private buildSlugMaps() : array{0: array>, 1: array>}
Return values
array{0: array>, 1: array>}

extractPageIds()

Returns the whitelisted page ids from the M2M `page_route_rel` relation.

private extractPageIds(Route $route) : array<int, int>
Parameters
$route : Route
Return values
array<int, int>
On this page

Search results