public function EdgeEntityType::__construct in Apigee Edge 8
EdgeEntityType constructor.
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
- src/
Entity/ EdgeEntityType.php, line 57
Class
- EdgeEntityType
- Provides an implementation of an Apigee Edge entity type and its metadata.
Namespace
Drupal\apigee_edge\EntityCode
public function __construct(array $definition) {
parent::__construct($definition);
// Some default settings for our entity types.
$this->handlers += [
'view_builder' => EdgeEntityViewBuilder::class,
'list_builder' => EdgeEntityListBuilder::class,
'route_provider' => [
'html' => EdgeEntityRouteProvider::class,
],
];
// Add entity type id to the list cache tags to help easier cache
// invalidation.
$this->list_cache_tags[] = $this->id;
}