function system_post_update_add_region_to_entity_displays in Drupal 8
Update entity displays to contain the region for each field.
File
- core/
modules/ system/ system.post_update.php, line 46 - Post update functions for System.
Code
function system_post_update_add_region_to_entity_displays() {
$entity_save = function (EntityDisplayInterface $entity) {
// preSave() will fill in the correct region based on the 'type'.
$entity
->save();
};
array_map($entity_save, EntityViewDisplay::loadMultiple());
array_map($entity_save, EntityFormDisplay::loadMultiple());
}