class DomainConfigLibraryDiscoveryCollector in Domain Access 8
Class DomainConfigLibraryDiscoveryCollector.
@package Drupal\domain_config
Hierarchy
- class \Drupal\Core\Cache\CacheCollector implements CacheCollectorInterface, DestructableInterface
- class \Drupal\Core\Asset\LibraryDiscoveryCollector
- class \Drupal\domain_config\DomainConfigLibraryDiscoveryCollector
- class \Drupal\Core\Asset\LibraryDiscoveryCollector
Expanded class hierarchy of DomainConfigLibraryDiscoveryCollector
1 string reference to 'DomainConfigLibraryDiscoveryCollector'
- domain_config.services.yml in domain_config/
domain_config.services.yml - domain_config/domain_config.services.yml
1 service uses DomainConfigLibraryDiscoveryCollector
File
- domain_config/
src/ DomainConfigLibraryDiscoveryCollector.php, line 13
Namespace
Drupal\domain_configView source
class DomainConfigLibraryDiscoveryCollector extends LibraryDiscoveryCollector {
/**
* The active domain.
*
* @var \Drupal\domain\DomainInterface
*/
protected $domain;
/**
* Set a domain.
*
* @param \Drupal\domain\DomainNegotiatorInterface $domainNegotiator
* The domain negotiator.
*/
public function setDomainNegotiator(DomainNegotiatorInterface $domainNegotiator) {
$this->domain = $domainNegotiator
->getActiveDomain();
}
/**
* {@inheritdoc}
*/
protected function getCid() {
if (!isset($this->cid)) {
$domain_id = 'null';
if (!empty($this->domain)) {
$domain_id = $this->domain
->id();
}
$this->cid = 'library_info:' . $domain_id . ':' . $this->themeManager
->getActiveTheme()
->getName();
}
return $this->cid;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheCollector:: |
protected | property | The cache backend that should be used. | 1 |
CacheCollector:: |
protected | property | Stores the cache creation time. | |
CacheCollector:: |
protected | property | Flag that indicates of the cache has been invalidated. | |
CacheCollector:: |
protected | property | Indicates if the collected cache was already loaded. | |
CacheCollector:: |
protected | property | The cache id that is used for the cache entry. | |
CacheCollector:: |
protected | property | An array of keys to add to the cache on service termination. | |
CacheCollector:: |
protected | property | An array of keys to remove from the cache on service termination. | |
CacheCollector:: |
protected | property | The lock backend that should be used. | 1 |
CacheCollector:: |
protected | property | Storage for the data itself. | |
CacheCollector:: |
protected | property | A list of tags that are used for the cache entry. | |
CacheCollector:: |
public | function |
Clears the collected cache entry. Overrides CacheCollectorInterface:: |
1 |
CacheCollector:: |
public | function |
Deletes the element. Overrides CacheCollectorInterface:: |
|
CacheCollector:: |
public | function |
Performs destruct operations. Overrides DestructableInterface:: |
|
CacheCollector:: |
public | function |
Gets value from the cache. Overrides CacheCollectorInterface:: |
2 |
CacheCollector:: |
public | function |
Returns whether data exists for this key. Overrides CacheCollectorInterface:: |
1 |
CacheCollector:: |
protected | function | Invalidate the cache. | |
CacheCollector:: |
protected | function | Loads the cache if not already done. | 1 |
CacheCollector:: |
protected | function | Normalizes a cache ID in order to comply with database limitations. | |
CacheCollector:: |
protected | function | Flags an offset value to be written to the persistent cache. | |
CacheCollector:: |
public | function |
Implements \Drupal\Core\Cache\CacheCollectorInterface::set(). Overrides CacheCollectorInterface:: |
1 |
CacheCollector:: |
protected | function | Writes a value to the persistent cache immediately. | 1 |
DomainConfigLibraryDiscoveryCollector:: |
protected | property | The active domain. | |
DomainConfigLibraryDiscoveryCollector:: |
protected | function |
Gets the cache ID. Overrides LibraryDiscoveryCollector:: |
|
DomainConfigLibraryDiscoveryCollector:: |
public | function | Set a domain. | |
LibraryDiscoveryCollector:: |
protected | property | The library discovery parser. | |
LibraryDiscoveryCollector:: |
protected | property | The theme manager. | |
LibraryDiscoveryCollector:: |
protected | function | Applies the libraries-extend specified by the active theme. | |
LibraryDiscoveryCollector:: |
protected | function | Returns the library definitions for a given extension. | |
LibraryDiscoveryCollector:: |
public | function |
Resets the local cache. Overrides CacheCollector:: |
|
LibraryDiscoveryCollector:: |
protected | function |
Resolves a cache miss. Overrides CacheCollector:: |
|
LibraryDiscoveryCollector:: |
public | function |
Constructs a CacheCollector object. Overrides CacheCollector:: |