function block_content_entity_type_alter
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); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!block_content!block_content.module/function/block_content_entity_type_alter/8.1.x