AmbiguousBundleClassException.php

Same filename and directory in other branches
  1. 9 core/lib/Drupal/Core/Entity/Exception/AmbiguousBundleClassException.php
  2. 10 core/lib/Drupal/Core/Entity/Exception/AmbiguousBundleClassException.php

Namespace

Drupal\Core\Entity\Exception

File

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.