AmbiguousBundleClassException.php
Same filename in other branches
Namespace
Drupal\Core\Entity\ExceptionFile
-
core/
lib/ Drupal/ Core/ Entity/ Exception/ AmbiguousBundleClassException.php
View source
<?php
namespace Drupal\Core\Entity\Exception;
/**
* Exception thrown if a bundle class is defined for multiple bundles.
*
* @see \Drupal\Core\Entity\ContentEntityStorageBase::getBundleFromClass()
* @see \Drupal\Core\Entity\EntityTypeRepository::getEntityTypeFromClass()
*/
class AmbiguousBundleClassException extends AmbiguousEntityClassException {
/**
* Constructs an AmbiguousBundleClassException.
*
* @param string $class
* The bundle class which is defined for multiple bundles.
*/
public function __construct(string $class) {
$message = sprintf('Multiple bundles are using the bundle class %s.', $class);
parent::__construct($message);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
AmbiguousBundleClassException | Exception thrown if a bundle class is defined for multiple bundles. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.