class MissingBundleClassException

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Exception/MissingBundleClassException.php \Drupal\Core\Entity\Exception\MissingBundleClassException
  2. 11.x core/lib/Drupal/Core/Entity/Exception/MissingBundleClassException.php \Drupal\Core\Entity\Exception\MissingBundleClassException

Exception thrown if a bundle class does not exist.

Hierarchy

Expanded class hierarchy of MissingBundleClassException

See also

\Drupal\Core\Entity\ContentEntityStorageBase::getEntityClass()

2 files declare their use of MissingBundleClassException
BundleClassTest.php in core/tests/Drupal/KernelTests/Core/Entity/BundleClassTest.php
ContentEntityStorageBase.php in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php

File

core/lib/Drupal/Core/Entity/Exception/MissingBundleClassException.php, line 10

Namespace

Drupal\Core\Entity\Exception
View source
class MissingBundleClassException extends \Exception {
    
    /**
     * Constructs a MissingBundleClassException.
     *
     * @param string $bundle_class
     *   The bundle class which should exist.
     */
    public function __construct(string $bundle_class) {
        $message = sprintf('Bundle class %s does not exist.', $bundle_class);
        parent::__construct($message);
    }

}

Members

Title Sort descending Modifiers Object type Summary
MissingBundleClassException::__construct public function Constructs a MissingBundleClassException.

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