interface DomainInterface in Domain Access 8
Provides an interface defining a domain entity.
Hierarchy
- interface \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterface; interface \Drupal\Core\Entity\SynchronizableInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface
- interface \Drupal\domain\DomainInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface
Expanded class hierarchy of DomainInterface
All classes that implement DomainInterface
34 files declare their use of DomainInterface
- DefaultDomain.php in domain/
src/ Plugin/ Action/ DefaultDomain.php - DeleteDomain.php in domain/
src/ Plugin/ Action/ DeleteDomain.php - DisableDomain.php in domain/
src/ Plugin/ Action/ DisableDomain.php - domain.drush.inc in domain/
domain.drush.inc - Drush commands for Domain Access.
- domain.install in domain/
domain.install - Install, update and uninstall functions for the Domain Access module.
File
- domain/
src/ DomainInterface.php, line 11
Namespace
Drupal\domainView source
interface DomainInterface extends ConfigEntityInterface {
/**
* The name of the admin access control field.
*/
const DOMAIN_ADMIN_FIELD = 'field_domain_admin';
/**
* Detects if the current domain is the active domain.
*
* @return bool
* TRUE if domain enabled, FALSE otherwise.
*/
public function isActive();
/**
* Detects if the current domain is the default domain.
*
* @return bool
* TRUE if domain set as default, FALSE otherwise.
*/
public function isDefault();
/**
* Detects if the domain uses https for links.
*
* @return bool
* TRUE if domain protocol is HTTPS, FALSE otherwise.
*/
public function isHttps();
/**
* Makes a domain record the default.
*/
public function saveDefault();
/**
* Saves a specific domain attribute.
*
* @param string $name
* The property key to save for the $domain object.
* @param mixed $value
* The value to set for the property.
*/
public function saveProperty($name, $value);
/**
* Sets the base path to this domain.
*/
public function setPath();
/**
* Sets the domain-specific link to the current URL.
*/
public function setUrl();
/**
* Gets the path for a domain.
*
* @return string
* A URL string for the base path to the domain. (e.g. http://example.com/)
*/
public function getPath();
/**
* Gets the url for a domain.
*
* @return string
* A URL string for the current request on the requested domain. If the
* current request is /user the return would be http://example.com/user or
* http://one.example.com, depending on the current domain context.
*/
public function getUrl();
/**
* Returns the active scheme for a domain record.
*
* This method is to be used when generating URLs.
*
* @param bool $add_suffix
* Tells the method to return :// after the string.
*
* @return string
* Returns a valid scheme (http or https), with or without the suffix.
*/
public function getScheme($add_suffix = TRUE);
/**
* Returns the stored scheme value for a domain record.
*
* This method is to be used with forms and when saving domain records. It
* returns the raw value (http|https|variable) of the domain's default scheme.
*
* @return string
* Returns a stored scheme default (http|https|variable) for the record.
*/
public function getRawScheme();
/**
* Retrieves the value of the response test.
*
* @return int
* The HTTP response code of the domain test, expected to be 200.
*/
public function getResponse();
/**
* Sets the value of the response test.
*
* @param int $response
* The HTTP response code to set.
*/
public function setResponse($response);
/**
* Adds a property to the domain record.
*
* @param string $name
* The name of the property to retrieve.
* @param mixed $value
* The value of the property.
*/
public function addProperty($name, $value);
/**
* Returns a URL object for a domain.
*
* @param bool $current_path
* Indicates that the link should point to the path of the current request.
*
* @return \Drupal\Core\Url
* A core URL object.
*/
public function getLink($current_path = TRUE);
/**
* Returns the redirect status of the current domain.
*
* @return int|null
* If numeric, the type of redirect to issue (301 or 302).
*/
public function getRedirect();
/**
* Sets a redirect on the current domain.
*
* @param int $code
* A valid HTTP redirect code (301 or 302).
*/
public function setRedirect($code = 302);
/**
* Gets the hostname of the domain.
*
* @return string
* The domain hostname.
*/
public function getHostname();
/**
* Sets the hostname of the domain.
*
* @param string $hostname
* The hostname value to set, in the format example.com.
*/
public function setHostname($hostname);
/**
* Gets the numeric id of the domain record.
*
* @return int
* The domain id.
*/
public function getDomainId();
/**
* Gets the sort weight of the domain record.
*
* @return int
* The domain record sort weight.
*/
public function getWeight();
/**
* Sets the type of record match returned by the negotiator.
*
* @param int $match_type
* A numeric constant indicating the type of match derived by the caller.
* Use this value to determine if the request needs to be overridden. Valid
* types are DomainNegotiatorInterface::DOMAIN_MATCH_NONE,
* DomainNegotiatorInterface::DOMAIN_MATCH_EXACT,
* DomainNegotiatorInterface::DOMAIN_MATCH_ALIAS.
*/
public function setMatchType($match_type = DomainNegotiatorInterface::DOMAIN_MATCHED_EXACT);
/**
* Gets the type of record match returned by the negotiator.
*
* This value will be set by the domain negotiation routine and is not present
* when loading a domain record via DomainStorageInterface.
*
* @return int
* The domain record match type.
*
* @see setMatchType()
*/
public function getMatchType();
/**
* Find the port used for the domain.
*
* @return string
* An optional port string (e.g. ':8080') or an empty string;
*/
public function getPort();
/**
* Creates a unique domain id for this record.
*/
public function createDomainId();
/**
* Retrieves the canonical (registered) hostname for the domain.
*
* @return string
* A hostname string.
*/
public function getCanonical();
/**
* Sets the canonical (registered) hostname for the domain.
*/
public function setCanonical($hostname = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AccessibleInterface:: |
public | function | Checks data value access. | 9 |
CacheableDependencyInterface:: |
public | function | The cache contexts associated with this object. | 34 |
CacheableDependencyInterface:: |
public | function | The maximum age for which this object may be cached. | 34 |
CacheableDependencyInterface:: |
public | function | The cache tags associated with this object. | 27 |
ConfigEntityInterface:: |
public | function | Calculates dependencies and stores them in the dependency property. | 2 |
ConfigEntityInterface:: |
public | function | Disables the configuration entity. | 2 |
ConfigEntityInterface:: |
public | function | Enables the configuration entity. | 2 |
ConfigEntityInterface:: |
public | function | Returns the value of a property. | 2 |
ConfigEntityInterface:: |
public | function | Gets the configuration dependencies. | 2 |
ConfigEntityInterface:: |
public | function | Gets whether on not the data is trusted. | 2 |
ConfigEntityInterface:: |
public | function | Checks whether this entity is installable. | 2 |
ConfigEntityInterface:: |
public | function | Returns whether this entity is being changed during the uninstall process. | 2 |
ConfigEntityInterface:: |
public | function | Informs the entity that entities it depends on will be deleted. | 2 |
ConfigEntityInterface:: |
public | function | Sets the value of a property. | 2 |
ConfigEntityInterface:: |
public | function | Sets the status of the configuration entity. | 2 |
ConfigEntityInterface:: |
public | function | Returns whether the configuration entity is enabled. | 2 |
ConfigEntityInterface:: |
public | function | Sets that the data should be trusted. | 2 |
DomainInterface:: |
public | function | Adds a property to the domain record. | 1 |
DomainInterface:: |
public | function | Creates a unique domain id for this record. | 1 |
DomainInterface:: |
constant | The name of the admin access control field. | ||
DomainInterface:: |
public | function | Retrieves the canonical (registered) hostname for the domain. | 1 |
DomainInterface:: |
public | function | Gets the numeric id of the domain record. | 1 |
DomainInterface:: |
public | function | Gets the hostname of the domain. | 1 |
DomainInterface:: |
public | function | Returns a URL object for a domain. | 1 |
DomainInterface:: |
public | function | Gets the type of record match returned by the negotiator. | 1 |
DomainInterface:: |
public | function | Gets the path for a domain. | 1 |
DomainInterface:: |
public | function | Find the port used for the domain. | 1 |
DomainInterface:: |
public | function | Returns the stored scheme value for a domain record. | 1 |
DomainInterface:: |
public | function | Returns the redirect status of the current domain. | 1 |
DomainInterface:: |
public | function | Retrieves the value of the response test. | 1 |
DomainInterface:: |
public | function | Returns the active scheme for a domain record. | 1 |
DomainInterface:: |
public | function | Gets the url for a domain. | 1 |
DomainInterface:: |
public | function | Gets the sort weight of the domain record. | 1 |
DomainInterface:: |
public | function | Detects if the current domain is the active domain. | 1 |
DomainInterface:: |
public | function | Detects if the current domain is the default domain. | 1 |
DomainInterface:: |
public | function | Detects if the domain uses https for links. | 1 |
DomainInterface:: |
public | function | Makes a domain record the default. | 1 |
DomainInterface:: |
public | function | Saves a specific domain attribute. | 1 |
DomainInterface:: |
public | function | Sets the canonical (registered) hostname for the domain. | 1 |
DomainInterface:: |
public | function | Sets the hostname of the domain. | 1 |
DomainInterface:: |
public | function | Sets the type of record match returned by the negotiator. | 1 |
DomainInterface:: |
public | function | Sets the base path to this domain. | 1 |
DomainInterface:: |
public | function | Sets a redirect on the current domain. | 1 |
DomainInterface:: |
public | function | Sets the value of the response test. | 1 |
DomainInterface:: |
public | function | Sets the domain-specific link to the current URL. | 1 |
EntityInterface:: |
public | function | Gets the bundle of the entity. | 2 |
EntityInterface:: |
public static | function | Constructs a new entity object, without permanently saving it. | 2 |
EntityInterface:: |
public | function | Creates a duplicate of the entity. | 2 |
EntityInterface:: |
public | function | Deletes an entity permanently. | 2 |
EntityInterface:: |
public | function | Enforces an entity to be new. | 2 |
EntityInterface:: |
public | function | Returns the cache tags that should be used to invalidate caches. | 2 |
EntityInterface:: |
public | function | Gets the key that is used to store configuration dependencies. | 2 |
EntityInterface:: |
public | function | Gets the configuration dependency name. | 2 |
EntityInterface:: |
public | function | Gets the configuration target identifier for the entity. | 2 |
EntityInterface:: |
public | function | Gets the entity type definition. | 2 |
EntityInterface:: |
public | function | Gets the ID of the type of the entity. | 2 |
EntityInterface:: |
public | function | Gets the original ID. | 2 |
EntityInterface:: |
public | function | Gets a typed data object for this entity object. | 2 |
EntityInterface:: |
public | function | Indicates if a link template exists for a given key. | 2 |
EntityInterface:: |
public | function | Gets the identifier. | 2 |
EntityInterface:: |
public | function | Determines whether the entity is new. | 2 |
EntityInterface:: |
public | function | Gets the label of the entity. | 2 |
EntityInterface:: |
public | function | Gets the language of the entity. | 2 |
EntityInterface:: |
public | function | Deprecated way of generating a link to the entity. See toLink(). | 2 |
EntityInterface:: |
public static | function | Loads an entity. | 2 |
EntityInterface:: |
public static | function | Loads one or more entities. | 2 |
EntityInterface:: |
public | function | Acts on a created entity before hooks are invoked. | 2 |
EntityInterface:: |
public static | function | Acts on deleted entities before the delete hook is invoked. | 2 |
EntityInterface:: |
public static | function | Acts on loaded entities. | 3 |
EntityInterface:: |
public | function | Acts on a saved entity before the insert or update hook is invoked. | 2 |
EntityInterface:: |
public static | function | Changes the values of an entity before it is created. | 2 |
EntityInterface:: |
public static | function | Acts on entities before they are deleted and before hooks are invoked. | 2 |
EntityInterface:: |
public | function | Acts on an entity before the presave hook is invoked. | 2 |
EntityInterface:: |
public | function | Gets a list of entities referenced by this entity. | 2 |
EntityInterface:: |
public | function | Saves an entity permanently. | 2 |
EntityInterface:: |
public | function | Sets the original ID. | 2 |
EntityInterface:: |
public | function | Gets an array of all property values. | 3 |
EntityInterface:: |
public | function | Generates the HTML for a link to this entity. | 2 |
EntityInterface:: |
public | function | Gets the URL object for the entity. | 2 |
EntityInterface:: |
public | function | Gets a list of URI relationships supported by this entity. | 2 |
EntityInterface:: |
public | function | Gets the public URL for this entity. | 2 |
EntityInterface:: |
public | function | Gets the URL object for the entity. | 2 |
EntityInterface:: |
public | function | Gets the entity UUID (Universally Unique Identifier). | 2 |
RefinableCacheableDependencyInterface:: |
public | function | Adds a dependency on an object: merges its cacheability metadata. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache contexts. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache tags. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Merges the maximum age (in seconds) with the existing maximum age. | 1 |
SynchronizableInterface:: |
public | function | Returns whether this entity is being changed as part of a synchronization. | 1 |
SynchronizableInterface:: |
public | function | Sets the status of the synchronization flag. | 1 |
ThirdPartySettingsInterface:: |
public | function | Gets the list of third parties that store information. | 5 |
ThirdPartySettingsInterface:: |
public | function | Gets the value of a third-party setting. | 5 |
ThirdPartySettingsInterface:: |
public | function | Gets all third-party settings of a given module. | 5 |
ThirdPartySettingsInterface:: |
public | function | Sets the value of a third-party setting. | 5 |
ThirdPartySettingsInterface:: |
public | function | Unsets a third-party setting. | 5 |