You are here

public function BundleClassInheritanceException::__construct in Drupal 10

Constructs a BundleClassInheritanceException.

Parameters

string $bundle_class: The bundle class which should extend the entity class.

string $entity_class: The entity class which should be extended.

File

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

Class

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

Namespace

Drupal\Core\Entity\Exception

Code

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);
}