function AmbiguousEntityClassException::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php \Drupal\Core\Entity\Exception\AmbiguousEntityClassException::__construct()
  2. 10 core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php \Drupal\Core\Entity\Exception\AmbiguousEntityClassException::__construct()
  3. 11.x core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php \Drupal\Core\Entity\Exception\AmbiguousEntityClassException::__construct()

Constructs an AmbiguousEntityClassException.

Parameters

string $class: The entity parent class.

File

core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php, line 18

Class

AmbiguousEntityClassException
Exception thrown if multiple entity types exist for an entity class.

Namespace

Drupal\Core\Entity\Exception

Code

public function __construct($class) {
    $message = sprintf('Multiple entity types found for %s.', $class);
    parent::__construct($message);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.