public function DomainAliasStorage::loadByEnvironment in Domain Access 8
Loads an array of domain alias record by environment lookup.
Parameters
string $environment: An environment string, e.g. 'default' or 'local'.
Return value
array An array of \Drupal\domain_alias\DomainAliasInterface objects.
Overrides DomainAliasStorageInterface::loadByEnvironment
File
- domain_alias/
src/ DomainAliasStorage.php, line 98
Class
- DomainAliasStorage
- Alias loader utility class.
Namespace
Drupal\domain_aliasCode
public function loadByEnvironment($environment) {
$result = $this
->loadByProperties([
'environment' => $environment,
]);
if (empty($result)) {
return NULL;
}
return $result;
}