EntityUuidConverter
class EntityUuidConverter extends EntityConverter (View source)
| internal | JSON:API maintains no PHP API since its API is the HTTP API. This class may change at any time and this will break any dependencies on it. |
Parameter converter for upcasting entity UUIDs to full objects.
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 LanguageManagerInterface | $languageManager | The language manager. |
Methods
Determines the entity type ID given a route definition and route defaults.
Constructs a new EntityConverter.
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, EntityRepositoryInterface $entity_repository)
Constructs a new EntityConverter.
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.
setLanguageManager(LanguageManagerInterface $language_manager)
Injects the language manager.