Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BundleClassInheritanceException.php

class BundleClassInheritanceException

Exception thrown if a bundle class does not extend the main entity class.

Hierarchy

  • class \Drupal\Core\Entity\Exception\BundleClassInheritanceException extends \Drupal\Core\Entity\Exception\Exception

Expanded class hierarchy of BundleClassInheritanceException

See also

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

1 file declares its use of BundleClassInheritanceException
ContentEntityStorageBase.php in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php

File

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

Namespace

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

}

Members

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal