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
File
- core/modules/content_moderation/src/EntityTypeInfo.php, line 111
Class
- EntityTypeInfo
- Manipulates entity type information.
Namespace
Drupal\content_moderation
Code
1 2 3 4 5 6 | 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' )]); } } |
Please login to continue.