Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

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.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal