class AmbiguousEntityClassException in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php \Drupal\Core\Entity\Exception\AmbiguousEntityClassException
- 10 core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php \Drupal\Core\Entity\Exception\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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AmbiguousEntityClassException:: |
public | function | Constructs an AmbiguousEntityClassException. |