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
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.