- Issue created by @gueguerreiro
- Merge request !34Issue #3515977 by gueguerreiro: Allow for explicitly specifying domain for... → (Open) created by gueguerreiro
Currently, when calling getPathByAlias() or getAliasByPath(), the domain that is used for the lookups is always the currently active domain:
$active = \Drupal::service('domain.negotiator')->getActiveDomain();
I have a scenario where I need to fetch the alias for a specific domain, which the method does not allow.
Allow for an optional domain argument, that uses that specific domain to get the alias from. Since it's nullable, and will be added to the end of the function signature, it will not have BC implications.
If it isn't set, defaults to current behavior (Fetch the currently active domain).
DomainPathAliasManager::getAliasByPath() and DomainPathAliasManager::getPathByAlias() can now be called with an extra Domain parameter, to fetch the alias for that specific domain.
Active
1.0
Code