function ConfigEntityType::checkStorageClass

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php \Drupal\Core\Config\Entity\ConfigEntityType::checkStorageClass()
  2. 10 core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php \Drupal\Core\Config\Entity\ConfigEntityType::checkStorageClass()
  3. 11.x core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php \Drupal\Core\Config\Entity\ConfigEntityType::checkStorageClass()

Throws

\Drupal\Core\Config\Entity\Exception\ConfigEntityStorageClassException Exception thrown when the provided class is not an instance of \Drupal\Core\Config\Entity\ConfigEntityStorage.

Overrides EntityType::checkStorageClass

See also

\Drupal\Core\Config\Entity\ConfigEntityStorage

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php, line 138

Class

ConfigEntityType
Provides an implementation of a configuration entity type and its metadata.

Namespace

Drupal\Core\Config\Entity

Code

protected function checkStorageClass($class) {
    if (!is_a($class, 'Drupal\\Core\\Config\\Entity\\ConfigEntityStorage', TRUE)) {
        throw new ConfigEntityStorageClassException("{$class} is not \\Drupal\\Core\\Config\\Entity\\ConfigEntityStorage or it does not extend it");
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.