Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / image / image.post_update.php
1 <?php
2
3 /**
4  * @file
5  * Post-update functions for Image.
6  */
7
8 use Drupal\Core\Entity\Entity\EntityViewDisplay;
9 use Drupal\Core\Entity\Entity\EntityFormDisplay;
10
11 /**
12  * Saves the image style dependencies into form and view display entities.
13  */
14 function image_post_update_image_style_dependencies() {
15   // Merge view and form displays. Use array_values() to avoid key collisions.
16   $displays = array_merge(array_values(EntityViewDisplay::loadMultiple()), array_values(EntityFormDisplay::loadMultiple()));
17   /** @var \Drupal\Core\Entity\Display\EntityDisplayInterface[] $displays */
18   foreach ($displays as $display) {
19     // Re-save each config entity to add missed dependencies.
20     $display->save();
21   }
22 }