public function DomainStorage::createHostname in Domain Access 8
Gets the hostname of the active request.
Return value
string The hostname string of the current request.
Overrides DomainStorageInterface::createHostname
2 calls to DomainStorage::createHostname()
- DomainStorage::create in domain/
src/ DomainStorage.php - Constructs a new entity object, without permanently saving it.
- DomainStorage::createMachineName in domain/
src/ DomainStorage.php - Creates a machine-name string from the hostname.
File
- domain/
src/ DomainStorage.php, line 175
Class
- DomainStorage
- Loads Domain records.
Namespace
Drupal\domainCode
public function createHostname() {
// We cannot inject the negotiator due to dependencies.
return \Drupal::service('domain.negotiator')
->negotiateActiveHostname();
}