You are here

function collageformatter_flush_style_submit in Collage Formatter 8

Same name and namespace in other branches
  1. 7 collageformatter.module \collageformatter_flush_style_submit()

Flushes collageformatter style images.

1 string reference to 'collageformatter_flush_style_submit'
collageformatter_form_entity_view_display_edit_form_alter in ./collageformatter.module
Implements hook_form_FORM_ID_alter().

File

./collageformatter.module, line 61
Main file for Collage Formatter module.

Code

function collageformatter_flush_style_submit() {
  if (ImageStyle::load('collageformatter')) {
    $style = ImageStyle::load('collageformatter');
    $style
      ->flush();
    drupal_set_message(t('Style %style has been flushed.', [
      '%style' => 'collageformatter',
    ]));
  }
  else {
    drupal_set_message(t('Style %style is not found.', [
      '%style' => 'collageformatter',
    ]));
  }
}