AmbiguousEntityClassException.php 500 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Drupal\Core\Entity\Exception;
  3. /**
  4. * Exception thrown if multiple entity types exist for an entity class.
  5. *
  6. * @see hook_entity_info_alter()
  7. */
  8. class AmbiguousEntityClassException extends \Exception {
  9. /**
  10. * Constructs an AmbiguousEntityClassException.
  11. *
  12. * @param string $class
  13. * The entity parent class.
  14. */
  15. public function __construct($class) {
  16. $message = sprintf('Multiple entity types found for %s.', $class);
  17. parent::__construct($message);
  18. }
  19. }