AliasRepositoryInterface
interface AliasRepositoryInterface (View source)
Provides an interface for path alias lookup operations.
The path alias repository service is only used internally in order to optimize alias lookup queries needed in the critical path of each request. However, it is not marked as an internal service because alternative storage backends still need to override it if they provide a different storage class for the PathAlias entity type.
Whenever you need to determine whether an alias exists for a system path, or whether a system path has an alias, the 'path_alias.manager' service should be used instead.
Methods
Pre-loads path alias information for a given list of system paths.
Searches a path alias for a given Drupal system path.
Searches a path alias for a given alias.
Check if any alias exists starting with $initial_substring.
Details
string[]
preloadPathAlias(array $preloaded, string $langcode)
Pre-loads path alias information for a given list of system paths.
array|null
lookupBySystemPath(string $path, string $langcode)
Searches a path alias for a given Drupal system path.
The default implementation performs case-insensitive matching on the 'path' and 'alias' strings.
array|null
lookupByAlias(string $alias, string $langcode)
Searches a path alias for a given alias.
The default implementation performs case-insensitive matching on the 'path' and 'alias' strings.
bool
pathHasMatchingAlias(string $initial_substring)
Check if any alias exists starting with $initial_substring.