AmbiguousEntityClassException.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php
  2. 10 core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php
  3. 11.x core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php

Namespace

Drupal\Core\Entity\Exception

File

core/lib/Drupal/Core/Entity/Exception/AmbiguousEntityClassException.php

View source
<?php

namespace Drupal\Core\Entity\Exception;


/**
 * Exception thrown if multiple entity types exist for an entity class.
 *
 * @see hook_entity_info_alter()
 */
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);
    }

}

Classes

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

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