protected function ImageStyleStorageController::attachLoad

Overrides \Drupal\Core\Config\Entity\ConfigStorageController::attachLoad().

Overrides ConfigStorageController::attachLoad

File

drupal/core/modules/image/lib/Drupal/image/ImageStyleStorageController.php, line 23
Contains \Drupal\image\ImageStyleStorageController.

Class

ImageStyleStorageController
Defines a controller class for image styles.

Namespace

Drupal\image

Code

protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
  foreach ($queried_entities as $style) {
    if (!empty($style->effects)) {
      foreach ($style->effects as $ieid => $effect) {
        $definition = image_effect_definition_load($effect['name']);
        $effect = array_merge($definition, $effect);
        $style->effects[$ieid] = $effect;
      }

      // Sort effects by weight.
      uasort($style->effects, 'drupal_sort_weight');
    }
  }
  parent::attachLoad($queried_entities, $revision_id);
}