Skip to content
Snippets Groups Projects

Updated code according to latest standards (where possible)

11 files
+ 43
39
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -6,7 +6,7 @@ use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\Context\CacheContextInterface;
use Drupal\Core\Entity\EntityRepositoryInterface;
use Drupal\domain\DomainNegotiatorInterface;
use Drupal\group_context_domain\Context\GroupFromDomainContextTrait;
use Drupal\group_context_domain\GroupFromDomainContextTrait;
/**
* Defines a cache context for "per group from domain" caching.
@@ -17,17 +17,10 @@ class DomainGroupCacheContext implements CacheContextInterface {
use GroupFromDomainContextTrait;
/**
* Constructs a new DomainGroupCacheContext.
*
* @param \Drupal\domain\DomainNegotiatorInterface $domain_negotiator
* The domain negotiator.
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
* The entity repository.
*/
public function __construct(DomainNegotiatorInterface $domain_negotiator, EntityRepositoryInterface $entity_repository) {
$this->domainNegotiator = $domain_negotiator;
$this->entityRepository = $entity_repository;
public function __construct(
protected DomainNegotiatorInterface $domainNegotiator,
protected EntityRepositoryInterface $entityRepository,
) {
}
/**
Loading