class NoCorrespondingEntityClassException in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Exception/NoCorrespondingEntityClassException.php \Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException
Exception thrown if an entity type is not represented by a class.
This might occur by calling a static method on an abstract class.
Hierarchy
- class \Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException extends \Drupal\Core\Entity\Exception\Exception
Expanded class hierarchy of NoCorrespondingEntityClassException
See also
\Drupal\Core\Entity\Entity::getEntityTypeFromStaticClass()
2 files declare their use of NoCorrespondingEntityClassException
- 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/ NoCorrespondingEntityClassException.php, line 12
Namespace
Drupal\Core\Entity\ExceptionView source
class NoCorrespondingEntityClassException extends \Exception {
/**
* Constructs a NoCorrespondingEntityClassException.
*
* @param string $class
* The class which does not correspond to an entity type.
*/
public function __construct($class) {
$message = sprintf('The %s class does not correspond to an entity type.', $class);
parent::__construct($message);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NoCorrespondingEntityClassException:: |
public | function | Constructs a NoCorrespondingEntityClassException. |