You are here

class AmbiguousBundleClassException in Drupal 10

Exception thrown if a bundle class is defined for multiple bundles.

Hierarchy

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\Exception
View 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