class AmbiguousEntityClassException
Exception thrown if multiple entity types exist for an entity class.
Hierarchy
- class \Drupal\Core\Entity\Exception\AmbiguousEntityClassException extends \Drupal\Core\Entity\Exception\Exception
Expanded class hierarchy of AmbiguousEntityClassException
See also
hook_entity_info_alter()
2 files declare their use of AmbiguousEntityClassException
- EntityTypeRepository.php in core/lib/ Drupal/ Core/ Entity/ EntityTypeRepository.php 
- EntityTypeRepositoryTest.php in core/tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeRepositoryTest.php 
File
- 
              core/lib/ Drupal/ Core/ Entity/ Exception/ AmbiguousEntityClassException.php, line 10 
Namespace
Drupal\Core\Entity\ExceptionView source
class AmbiguousEntityClassException extends \Exception {
  
  /**
   * Constructs an AmbiguousEntityClassException.
   *
   * @param string $class
   *   The entity parent class.
   */
  public function __construct($class) {
    $message = sprintf('Multiple entity types found for %s.', $class);
    parent::__construct($message);
  }
}Members
| Title Sort descending | Modifiers | Object type | Summary | 
|---|---|---|---|
| AmbiguousEntityClassException::__construct | public | function | Constructs an AmbiguousEntityClassException. | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
