block_content_entity_type_alter(array &$entity_types)
Implements hook_entity_type_alter().
File
- core/modules/block_content/block_content.module, line 57
- Allows the creation of custom blocks through the user interface.
Code
1 2 3 4 5 6 7 8 9 | function block_content_entity_type_alter( array & $entity_types ) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ // Add a translation handler for fields if the language module is enabled. if (\Drupal::moduleHandler()->moduleExists( 'language' )) { $translation = $entity_types [ 'block_content' ]->get( 'translation' ); $translation [ 'block_content' ] = TRUE; $entity_types [ 'block_content' ]->set( 'translation' , $translation ); } } |
Please login to continue.