TranslatorInterface
in
Table of Contents
Methods
- addTargetFactory() : void
- Registers a route factory that uses this translator.
- clearCache() : void
- Clears the cache.
- getTargetFactories() : array<string|int, string>
- Returns all route factories that use this translator.
- warmupCache() : void
- Preloads the cache.
- warmupFromEntities() : void
- Preloads the cache from already loaded entities, without a database query.
Methods
addTargetFactory()
Registers a route factory that uses this translator.
public
addTargetFactory(string $factoryClass) : void
Called from the factory constructor as addTargetFactory($this::class).
Parameters
- $factoryClass : string
-
fully qualified factory class name (e.g.
PageShowRouteFactory::class)
clearCache()
Clears the cache.
public
clearCache() : void
getTargetFactories()
Returns all route factories that use this translator.
public
getTargetFactories() : array<string|int, string>
Return values
array<string|int, string> —factory class names
warmupCache()
Preloads the cache.
public
warmupCache([array<string|int, int>|null $ids = null ]) : void
Parameters
- $ids : array<string|int, int>|null = null
-
entity ids to load; null loads all entities
warmupFromEntities()
Preloads the cache from already loaded entities, without a database query.
public
warmupFromEntities(array<string|int, mixed> $entities) : void
Parameters
- $entities : array<string|int, mixed>
-
entities with their translations loaded