Skip to content

ConfigEntityStorageDecorator needs to implement getEntityClass

Problem/Motivation

PHP Fatal error: Class Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\Entity\EntityStorageInterface::getEntityClass) in /app/web/modules/contrib/devel/webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php on line 18

This is introduced by this RTBC change to Core https://www.drupal.org/node/2570593

Proposed resolution

  /**
   * {@inheritdoc}
   */
  public function getEntityClass($bundle = NULL) {
    return $this->getOriginalObject()->getEntityClass($bundle);
  }
Edited by David Kitchen