StaticValueMapper

class \TYPO3\CMS\Core\Routing\Aspect\StaticValueMapper

Implements
StaticMappableAspectInterface, SiteLanguageAwareInterface, UnresolvedValueInterface, Countable
Uses
SiteLanguageAwareTrait, UnresolvedValueTrait

Mapper for having a static list of mapping them to value properties.

routeEnhancers: MyBlogExample: type: Extbase extension: BlogExample plugin: Pi1 routes: - { routePath: '/archive/{year}', _controller: 'Blog::archive' } defaultController: 'Blog::list' aspects: year: type: StaticValueMapper map: 2k17: '2017' 2k18: '2018' next: '2019' # (optional) localeMap: - locale: 'en_US.|en_GB.' map: twenty-seventeen: '2017' twenty-eighteen: '2018' next: '2019' - locale: 'fr_FR' map: vingt-dix-sept: '2017' vingt-dix-huit: '2018' prochain: '2019'

Table of Contents

Interfaces

StaticMappableAspectInterface
Used for anything that has a fixed list of values mapped against route arguments.
SiteLanguageAwareInterface
Interface for SiteLanguageAware features of TYPO3
UnresolvedValueInterface
Provides fallback values for unresolved values during processing mappers.
Countable

Properties

$localeMap  : array
$map  : array
$settings  : array
$siteLanguage  : SiteLanguage

Methods

__construct()  : mixed
count()  : int
{@inheritdoc}
generate()  : string|null
getFallbackValue()  : string|null
getSiteLanguage()  : SiteLanguage
hasFallbackValue()  : bool
resolve()  : string|null
setSiteLanguage()  : mixed
retrieveLocaleMap()  : array|null
Fetches the map of with the matching locale.

Properties

Methods

__construct()

public __construct(array $settings) : mixed

Parameters

$settings : array

Tags

throws
InvalidArgumentException

count()

{@inheritdoc}

public count() : int

Return values

int

generate()

public generate(string $value) : string|null

Parameters

$value : string

Return values

string|null

getFallbackValue()

public getFallbackValue() : string|null

Return values

string|null

hasFallbackValue()

public hasFallbackValue() : bool

Return values

bool

resolve()

public resolve(string $value) : string|null

Parameters

$value : string

Return values

string|null

retrieveLocaleMap()

Fetches the map of with the matching locale.

protected retrieveLocaleMap() : array|null

Return values

array|null
On this page