8.3.x ContentEntityType.php public ContentEntityType::__construct($definition)
8.0.x ContentEntityType.php public ContentEntityType::__construct($definition)
8.1.x ContentEntityType.php public ContentEntityType::__construct($definition)
8.2.x ContentEntityType.php public ContentEntityType::__construct($definition)
8.4.x ContentEntityType.php public ContentEntityType::__construct($definition)

Constructs a new EntityType.

Parameters

array $definition: An array of values from the annotation.

Throws

\Drupal\Core\Entity\Exception\EntityTypeIdLengthException Thrown when attempting to instantiate an entity type with too long ID.

Overrides EntityType::__construct

File

core/lib/Drupal/Core/Entity/ContentEntityType.php, line 13

Class

ContentEntityType
Provides an implementation of a content entity type and its metadata.

Namespace

Drupal\Core\Entity

Code

public function __construct($definition) {
  parent::__construct($definition);
  $this->handlers += array(
    'storage' => 'Drupal\Core\Entity\Sql\SqlContentEntityStorage',
    'view_builder' => 'Drupal\Core\Entity\EntityViewBuilder',
  );
}