EntityTypeInfo::entityTypeAlter

public EntityTypeInfo::entityTypeAlter(array &$entity_types)

Adds Moderation configuration to appropriate entity types.

This is an alter hook bridge.

Parameters

EntityTypeInterface[] $entity_types: The master entity type list to alter.

See also

hook_entity_type_alter()

File

core/modules/content_moderation/src/EntityTypeInfo.php, line 111

Class

EntityTypeInfo
Manipulates entity type information.

Namespace

Drupal\content_moderation

Code

public function entityTypeAlter(array &$entity_types) {
  foreach ($this->filterNonRevisionableEntityTypes($entity_types) as $type_name => $type) {
    $entity_types[$type_name] = $this->addModerationToEntityType($type);
    $entity_types[$type->get('bundle_of')] = $this->addModerationToEntity($entity_types[$type->get('bundle_of')]);
  }
}
doc_Drupal
2016-10-29 09:08:17
Comments
Leave a Comment

Please login to continue.