Site Alias Manager¶
The Site Alias Manager (SAM) service is used to retrieve information about one or all of the site aliases for the current installation.
- An informative example is the browse command
- A commandfile gets usually access to the SAM via autowire. The type hint to use is SiteAliasManagerInterface
- If an alias was used for the current request, it is available via
$this->siteAliasManager->getself()
. - The SAM generally deals in SiteAlias objects. That is how any given site alias is represented. See its methods for determining things like whether the alias points to a local host or remote host.
- Site alias docs.
- Dynamically alter site aliases.
- The SAM is also available for as a standalone Composer project. More information available in the README there.
Last update:
March 20, 2024
Authors: