ContentEntityType::__construct

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',
  );
}
doc_Drupal
2016-10-29 08:57:43
Comments
Leave a Comment

Please login to continue.