function NoCorrespondingEntityClassException::__construct

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

Constructs a NoCorrespondingEntityClassException.

Parameters

string $class: The class which does not correspond to an entity type.

File

core/lib/Drupal/Core/Entity/Exception/NoCorrespondingEntityClassException.php, line 20

Class

NoCorrespondingEntityClassException
Exception thrown if an entity type is not represented by a class.

Namespace

Drupal\Core\Entity\Exception

Code

public function __construct($class) {
    $message = sprintf('The %s class does not correspond to an entity type.', $class);
    parent::__construct($message);
}

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