Commit 668ea262 authored by gordon's avatar gordon Committed by lussoluca

Issue #2985275 by gordon, attisan: Exception when webprofiler is used in...

Issue #2985275 by gordon, attisan: Exception when webprofiler is used in conjunction with domain access module
parent fb28836d
<?php
namespace Drupal\webprofiler\Entity\Decorators\Config;
use Drupal\domain\DomainStorageInterface;
use Drupal\domain\DomainInterface;
/**
* Class DomainStorageDecorator
*/
class DomainStorageDecorator extends ConfigEntityStorageDecorator implements DomainStorageInterface {
/**
* {@inheritdoc}
*/
public function loadDefaultDomain() {
return $this->getOriginalObject()->loadDefaultDomain();
}
/**
* {@inheritdoc}
*/
public function loadDefaultId() {
return $this->getOriginalObject()->loadDefaultId();
}
/**
* {@inheritdoc}
*/
public function loadMultipleSorted(array $ids = NULL) {
return $this->getOriginalObject()->loadMultipleSorted($ids);
}
/**
* {@inheritdoc}
*/
public function loadByHostname($hostname) {
return $this->getOriginalObject()->loadByHostname($hostname);
}
/**
* {@inheritdoc}
*/
public function loadOptionsList() {
return $this->getOriginalObject()->loadOptionsList();
}
/**
* {@inheritdoc}
*/
public function sort(DomainInterface $a, DomainInterface $b) {
return $this->getOriginalObject()->sort($a, $b);
}
/**
* {@inheritdoc}
*/
public function loadSchema() {
return $this->getOriginalObject()->loadSchema();
}
/**
* {@inheritdoc}
*/
public function prepareHostname($hostname) {
return $this->getOriginalObject()->prepareHostname($hostname);
}
/**
* {@inheritdoc}
*/
public function createHostname() {
return $this->getOriginalObject()->createHostname();
}
/**
* {@inheritdoc}
*/
public function createMachineName($hostname = NULL) {
return $this->getOriginalObject()->createMachineName($hostname);
}
/**
* {@inheritdoc}
*/
public function getDefaultScheme() {
return $this->getOriginalObject()->getDefaultScheme();
}
}
...@@ -9,6 +9,7 @@ use Drupal\Core\Entity\EntityViewBuilderInterface; ...@@ -9,6 +9,7 @@ use Drupal\Core\Entity\EntityViewBuilderInterface;
use Drupal\Core\Plugin\DefaultPluginManager; use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator; use Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\ImageStyleStorageDecorator; use Drupal\webprofiler\Entity\Decorators\Config\ImageStyleStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\DomainStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\RoleStorageDecorator; use Drupal\webprofiler\Entity\Decorators\Config\RoleStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\ShortcutSetStorageDecorator; use Drupal\webprofiler\Entity\Decorators\Config\ShortcutSetStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\VocabularyStorageDecorator; use Drupal\webprofiler\Entity\Decorators\Config\VocabularyStorageDecorator;
...@@ -102,6 +103,9 @@ class EntityManagerWrapper extends DefaultPluginManager implements EntityTypeMan ...@@ -102,6 +103,9 @@ class EntityManagerWrapper extends DefaultPluginManager implements EntityTypeMan
case 'image_style': case 'image_style':
return new ImageStyleStorageDecorator($handler); return new ImageStyleStorageDecorator($handler);
break; break;
case 'domain':
return new DomainStorageDecorator($handler);
break;
default: default:
return new ConfigEntityStorageDecorator($handler); return new ConfigEntityStorageDecorator($handler);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment