Commit 0e8ffdec authored by webflo's avatar webflo Committed by lussoluca

Issue #2866135 by webflo: Exception when web profiler module enabled

parent e570f648
<?php
namespace Drupal\webprofiler\Entity\Decorators\Config;
use Drupal\Core\Session\AccountInterface;
use Drupal\image\ImageStyleStorageInterface;
use Drupal\shortcut\ShortcutSetInterface;
use Drupal\shortcut\ShortcutSetStorageInterface;
/**
* Class ImageStyleStorageDecorator
*/
class ImageStyleStorageDecorator extends ConfigEntityStorageDecorator implements ImageStyleStorageInterface {
/**
* {@inheritdoc}
*/
public function setReplacementId($name, $replacement) {
return $this->getOriginalObject()->setReplacementId($name, $replacement);
}
/**
* {@inheritdoc}
*/
public function getReplacementId($name) {
return $this->getOriginalObject()->getReplacementId($name);
}
/**
* {@inheritdoc}
*/
public function clearReplacementId($name) {
return $this->getOriginalObject()->clearReplacementId($name);
}
}
......@@ -8,6 +8,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\EntityViewBuilderInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\ImageStyleStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\RoleStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\ShortcutSetStorageDecorator;
use Drupal\webprofiler\Entity\Decorators\Config\VocabularyStorageDecorator;
......@@ -98,6 +99,9 @@ class EntityManagerWrapper extends DefaultPluginManager implements EntityTypeMan
case 'shortcut_set':
return new ShortcutSetStorageDecorator($handler);
break;
case 'image_style':
return new ImageStyleStorageDecorator($handler);
break;
default:
return new ConfigEntityStorageDecorator($handler);
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