DomainConfigLibraryDiscoveryCollector.php in Domain Access 8
File
domain_config/src/DomainConfigLibraryDiscoveryCollector.php
View source
<?php
namespace Drupal\domain_config;
use Drupal\Core\Asset\LibraryDiscoveryCollector;
use Drupal\domain\DomainNegotiatorInterface;
class DomainConfigLibraryDiscoveryCollector extends LibraryDiscoveryCollector {
protected $domain;
public function setDomainNegotiator(DomainNegotiatorInterface $domainNegotiator) {
$this->domain = $domainNegotiator
->getActiveDomain();
}
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;
}
}