You are here

function image_style_warmer_update_8001 in Image Style Warmer 8

Rename upload to initial image styles in image_style_warmer.settings.

File

./image_style_warmer.install, line 11
Install, update and uninstall functions for the image_style_warmer module.

Code

function image_style_warmer_update_8001() {
  $config_factory = \Drupal::configFactory();
  $settingsConfig = $config_factory
    ->getEditable('image_style_warmer.settings');
  $uploadImageStyles = $settingsConfig
    ->get('upload_image_styles');
  $queueImageStyles = $settingsConfig
    ->get('queue_image_styles');
  $settingsConfig
    ->clear('upload_image_styles');
  $settingsConfig
    ->clear('queue_image_styles');
  $settingsConfig
    ->set('initial_image_styles', $uploadImageStyles);
  $settingsConfig
    ->set('queue_image_styles', $queueImageStyles);
  $settingsConfig
    ->save();
}