class LayoutTempstoreParamConverter implements ParamConverterInterface (View source)

internal  Tagged services are internal.
 

Loads the section storage from the layout tempstore.

Properties

protected LayoutTempstoreRepositoryInterface $layoutTempstoreRepository

The layout tempstore repository.

protected SectionStorageManagerInterface $sectionStorageManager

The section storage manager.

Methods

__construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository, SectionStorageManagerInterface $section_storage_manager)

Constructs a new LayoutTempstoreParamConverter.

mixed|null
convert(mixed $value, mixed $definition, string $name, array $defaults)

Converts path variables to their corresponding objects.

bool
applies(mixed $definition, string $name, Route $route)

Determines if the converter applies to a specific route and variable.

Details

__construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository, SectionStorageManagerInterface $section_storage_manager)

Constructs a new LayoutTempstoreParamConverter.

Parameters

LayoutTempstoreRepositoryInterface $layout_tempstore_repository

The layout tempstore repository.

SectionStorageManagerInterface $section_storage_manager

The section storage manager.

mixed|null convert(mixed $value, mixed $definition, string $name, array $defaults)

Converts path variables to their corresponding objects.

Parameters

mixed $value

The raw value.

mixed $definition

The parameter definition provided in the route options.

string $name

The name of the parameter.

array $defaults

The route defaults array.

Return Value

mixed|null

The converted parameter value.

bool applies(mixed $definition, string $name, Route $route)

Determines if the converter applies to a specific route and variable.

Parameters

mixed $definition

The parameter definition provided in the route options.

string $name

The name of the parameter.

Route $route

The route to consider attaching to.

Return Value

bool

TRUE if the converter applies to the passed route and parameter, FALSE otherwise.