function EntitySchemaSubscriber::onEntityTypeCreate

Overrides EntityTypeEventSubscriberTrait::onEntityTypeCreate

1 call to EntitySchemaSubscriber::onEntityTypeCreate()
EntitySchemaSubscriber::onFieldableEntityTypeCreate in core/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php
Reacts to the creation of the fieldable entity type.

File

core/modules/workspaces/src/EventSubscriber/EntitySchemaSubscriber.php, line 70

Class

EntitySchemaSubscriber
Defines a class for listening to entity schema changes.

Namespace

Drupal\workspaces\EventSubscriber

Code

public function onEntityTypeCreate(EntityTypeInterface $entity_type) {
  // If the entity type is supported by Workspaces, add the revision metadata
  // field.
  if ($this->workspaceManager
    ->isEntityTypeSupported($entity_type)) {
    $this->addRevisionMetadataField($entity_type);
  }
}

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