function system_post_update_add_region_to_entity_displays
Update entity displays to contain the region for each field.
File
-
core/
modules/ system/ system.post_update.php, line 46
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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.