class AmbiguousBundleClassException
Exception thrown if a bundle class is defined for multiple bundles.
Hierarchy
- class \Drupal\Core\Entity\Exception\AmbiguousEntityClassException extends \Drupal\Core\Entity\Exception\Exception
- class \Drupal\Core\Entity\Exception\AmbiguousBundleClassException extends \Drupal\Core\Entity\Exception\AmbiguousEntityClassException
 
 
Expanded class hierarchy of AmbiguousBundleClassException
See also
\Drupal\Core\Entity\ContentEntityStorageBase::getBundleFromClass()
\Drupal\Core\Entity\EntityTypeRepository::getEntityTypeFromClass()
3 files declare their use of AmbiguousBundleClassException
- BundleClassTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ BundleClassTest.php  - ContentEntityStorageBase.php in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php  - EntityTypeRepository.php in core/
lib/ Drupal/ Core/ Entity/ EntityTypeRepository.php  
File
- 
              core/
lib/ Drupal/ Core/ Entity/ Exception/ AmbiguousBundleClassException.php, line 11  
Namespace
Drupal\Core\Entity\ExceptionView source
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);
  }
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title | 
|---|---|---|---|---|
| AmbiguousBundleClassException::__construct | public | function | Constructs an AmbiguousBundleClassException. | Overrides AmbiguousEntityClassException::__construct | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.