interface DomainStorageInterface in Domain Access 8
Provides an interface for domain entity storage.
Hierarchy
- interface \Drupal\Core\Entity\EntityStorageInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
- interface \Drupal\domain\DomainStorageInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
Expanded class hierarchy of DomainStorageInterface
All classes that implement DomainStorageInterface
4 files declare their use of DomainStorageInterface
- Domain.php in domain/
src/ Plugin/ views/ access/ Domain.php - DomainAccessContent.php in domain_access/
src/ Plugin/ views/ access/ DomainAccessContent.php - DomainAliasForm.php in domain_alias/
src/ DomainAliasForm.php - DomainControllerBase.php in domain/
src/ Controller/ DomainControllerBase.php
File
- domain/
src/ DomainStorageInterface.php, line 10
Namespace
Drupal\domainView source
interface DomainStorageInterface extends ConfigEntityStorageInterface {
/**
* Gets the default domain object.
*
* @return \Drupal\domain\DomainInterface|null
* The default domain record or NULL.
*/
public function loadDefaultDomain();
/**
* Returns the id of the default domain.
*
* @return int|bool
* The id of the default domain or FALSE if none is set.
*/
public function loadDefaultId();
/**
* Loads multiple domains and sorts by weight.
*
* @param array $ids
* An optional array of specific ids to load.
*
* @return \Drupal\domain\DomainInterface[]
* An array of domain records.
*/
public function loadMultipleSorted(array $ids = NULL);
/**
* Loads a domain record by hostname lookup.
*
* @param string $hostname
* A hostname string, in the format example.com.
*
* @return \Drupal\domain\DomainInterface|null
* The domain record or NULL.
*/
public function loadByHostname($hostname);
/**
* Returns the list of domains formatted for a form options list.
*
* @return array
* A weight-sorted array of id => label for use in forms.
*/
public function loadOptionsList();
/**
* Sorts domains by weight.
*
* For use by loadMultipleSorted().
*
* @param DomainInterface $a
* The first Domain object to sort.
* @param DomainInterface $b
* The Domain object to compare against.
*
* @return bool
* Wether the first domain weight is greater or not.
*/
public function sort(DomainInterface $a, DomainInterface $b);
/**
* Gets the entity field schema for domain records.
*
* @return array
* An array representing the field schema of the object.
*/
public function loadSchema();
/**
* Removes www. prefix from a hostname, if set.
*
* @param string $hostname
* A hostname.
*
* @return string
* The cleaned hostname.
*/
public function prepareHostname($hostname);
/**
* Gets the hostname of the active request.
*
* @return string
* The hostname string of the current request.
*/
public function createHostname();
/**
* Creates a machine-name string from the hostname.
*
* This string is the primary key of the entity.
*
* @param string $hostname
* The hostname of the domain record. If empty, the current request will be
* used.
*
* @return string
* A string containing A-Z, a-z, 0-9, and _ characters.
*/
public function createMachineName($hostname = NULL);
/**
* Returns the default http/https scheme for the site.
*
* This function helps us account for variable schemes across environments.
*
* @return string
* A string representation of s scheme (http|https).
*/
public function getDefaultScheme();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigEntityStorageInterface:: |
public | function | Creates a configuration entity from storage values. | 1 |
ConfigEntityStorageInterface:: |
public static | function | Extracts the configuration entity ID from the full configuration name. | 1 |
ConfigEntityStorageInterface:: |
public | function | Loads one or more entities in their original form without overrides. | 1 |
ConfigEntityStorageInterface:: |
public | function | Loads one entity in their original form without overrides. | 1 |
ConfigEntityStorageInterface:: |
public | function | Updates a configuration entity from storage values. | 1 |
DomainStorageInterface:: |
public | function | Gets the hostname of the active request. | 1 |
DomainStorageInterface:: |
public | function | Creates a machine-name string from the hostname. | 1 |
DomainStorageInterface:: |
public | function | Returns the default http/https scheme for the site. | 1 |
DomainStorageInterface:: |
public | function | Loads a domain record by hostname lookup. | 1 |
DomainStorageInterface:: |
public | function | Gets the default domain object. | 1 |
DomainStorageInterface:: |
public | function | Returns the id of the default domain. | 1 |
DomainStorageInterface:: |
public | function | Loads multiple domains and sorts by weight. | 1 |
DomainStorageInterface:: |
public | function | Returns the list of domains formatted for a form options list. | 1 |
DomainStorageInterface:: |
public | function | Gets the entity field schema for domain records. | 1 |
DomainStorageInterface:: |
public | function | Removes www. prefix from a hostname, if set. | 1 |
DomainStorageInterface:: |
public | function | Sorts domains by weight. | 1 |
EntityStorageInterface:: |
public | function | Constructs a new entity object, without permanently saving it. | 1 |
EntityStorageInterface:: |
public | function | Deletes permanently saved entities. | 1 |
EntityStorageInterface:: |
public | function | Delete a specific entity revision. | 4 |
EntityStorageInterface:: |
constant | Load the most recent version of an entity's field data. | ||
EntityStorageInterface:: |
constant | Load the version of an entity's field data specified in the entity. | ||
EntityStorageInterface:: |
public | function | Gets an aggregated query instance. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type definition. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type ID. | 1 |
EntityStorageInterface:: |
public | function | Gets an entity query instance. | 1 |
EntityStorageInterface:: |
public | function | Determines if the storage contains any data. | 1 |
EntityStorageInterface:: |
public | function | Loads one entity. | 1 |
EntityStorageInterface:: |
public | function | Load entities by their property values. | 1 |
EntityStorageInterface:: |
public | function | Loads one or more entities. | 1 |
EntityStorageInterface:: |
public | function | Load a specific entity revision. | 4 |
EntityStorageInterface:: |
public | function | Loads an unchanged entity from the database. | 1 |
EntityStorageInterface:: |
public | function | Resets the internal, static entity cache. | 1 |
EntityStorageInterface:: |
public | function | Restores a previously saved entity. | 1 |
EntityStorageInterface:: |
public | function | Saves the entity permanently. | 1 |