function image_post_update_image_style_dependencies
image_post_update_image_style_dependencies()
Saves the image style dependencies into form and view display entities.
File
- core/modules/image/image.post_update.php, line 14
- Post-update functions for Image.
Code
function image_post_update_image_style_dependencies() { // Merge view and form displays. Use array_values() to avoid key collisions. $displays = array_merge(array_values(EntityViewDisplay::loadMultiple()), array_values(EntityFormDisplay::loadMultiple())); /** @var \Drupal\Core\Entity\Display\EntityDisplayInterface[] $displays */ foreach ($displays as $display) { // Re-save each config entity to add missed dependencies. $display->save(); } }
© 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!image!image.post_update.php/function/image_post_update_image_style_dependencies/8.1.x