ViewUIConverter
class ViewUIConverter extends AdminPathConfigEntityConverter implements ParamConverterInterface (View source)
Provides upcasting for a view entity to be used in the Views UI.
Example:
pattern: '/some/{view}/and/{bar}' options: parameters: view: type: 'entity:view' tempstore: TRUE
The value for {view} will be converted to a view entity prepared for the Views UI and loaded from the views temp store, but it will not touch the value for {bar}.
Traits
Provides a trait to replace dynamic entity types in routes.
Properties
| protected EntityTypeManagerInterface | $entityTypeManager | Entity type manager which performs the upcasting in the end. |
from EntityConverter |
| protected EntityRepositoryInterface | $entityRepository | Entity repository. |
from EntityConverter |
| protected ConfigFactoryInterface | $configFactory | The config factory. |
from AdminPathConfigEntityConverter |
| protected AdminContext | $adminContext | The route admin context to determine whether a route is an admin one. |
from AdminPathConfigEntityConverter |
| protected SharedTempStoreFactory | $tempStoreFactory | Stores the tempstore factory. |
Methods
Determines the entity type ID given a route definition and route defaults.
Constructs a new ViewUIConverter.
Converts path variables to their corresponding objects.
Determines if the converter applies to a specific route and variable.
Details
protected string
getEntityTypeFromDefaults(mixed $definition, string $name, array $defaults)
Determines the entity type ID given a route definition and route defaults.
__construct(EntityTypeManagerInterface $entity_type_manager, SharedTempStoreFactory $temp_store_factory, ConfigFactoryInterface $config_factory, AdminContext $admin_context, EntityRepositoryInterface $entity_repository)
Constructs a new ViewUIConverter.
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.