trait LayoutBuilderRoutesTrait (View source)

Provides a trait for building routes for a Layout Builder UI.

Methods

buildLayoutRoutes(RouteCollection $collection, SectionStorageDefinition $definition, string $path, array $defaults = [], array $requirements = [], array $options = [], string $route_name_prefix = '', string $entity_type_id = '')

Builds the layout routes for the given values.

Details

protected buildLayoutRoutes(RouteCollection $collection, SectionStorageDefinition $definition, string $path, array $defaults = [], array $requirements = [], array $options = [], string $route_name_prefix = '', string $entity_type_id = '')

Builds the layout routes for the given values.

Parameters

RouteCollection $collection

The route collection.

SectionStorageDefinition $definition

The definition of the section storage.

string $path

The path patten for the routes.

array $defaults

(optional) An array of default parameter values.

array $requirements

(optional) An array of requirements for parameters.

array $options

(optional) An array of options.

string $route_name_prefix

(optional) The prefix to use for the route name.

string $entity_type_id

(optional) The entity type ID, if available.