You are here

public static function TextimageStyles::getEffectsOutline in Textimage 7.3

Build an outline of the style effects' data, given the style array.

This is used to build a thumbnail of just the effects' data, that can be used to produce a md5 hash without bringing in db dependent values. It also removes 'textimage_text' text input in the admin form for the effect, as this is a separate input to the hash.

Parameters

array $style: image style

Return value

array a simple array, where each element is an associative array of 'name' => the effect name 'data' => the effect data

3 calls to TextimageStyles::getEffectsOutline()
Textimage::style in classes/Textimage.inc
Set the image style.
Textimage::styleByName in classes/Textimage.inc
Set the image style, from the style name.
TextimageStyles::getStyleEffectsOutline in classes/TextimageStyles.inc
Build an outline of the style effects' data, given the style name.

File

classes/TextimageStyles.inc, line 248
Textimage - Styles handling class.

Class

TextimageStyles
Styles management class.

Code

public static function getEffectsOutline($style) {
  if (isset($style['effects'])) {
    $effects_outline = array();
    foreach ($style['effects'] as $effect_info) {
      $i = array(
        'name' => $effect_info['name'],
        'data' => $effect_info['data'],
      );
      $effects_outline[] = $i;
    }
    return $effects_outline;
  }
  else {
    return NULL;
  }
}