You are here

public static function TextimageStyles::isTextimage in Textimage 7.3

Check if an image style is Textimage relevant.

Also, it loads Textimage properties to the 'textimage' key of the style array.

Parameters

array $style: the image style to check

Return value

bool TRUE if style is Textimage relevant, otherwise FALSE

9 calls to TextimageStyles::isTextimage()
Textimage::style in classes/Textimage.inc
Set the image style.
TextimageStyles::get in classes/TextimageStyles.inc
Get a Textimage style by name.
TextimageStyles::getOptions in classes/TextimageStyles.inc
Get an array of Textimage styles for using as select list options.
textimage_image_styles_alter in ./textimage.module
Implements hook_image_styles_alter().
textimage_image_style_delete in ./textimage.module
Implements hook_image_style_delete().

... See full list

File

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

Class

TextimageStyles
Styles management class.

Code

public static function isTextimage(&$style) {
  if (!isset($style['effects'])) {
    return FALSE;
  }
  foreach ($style['effects'] as $effect_info) {
    if (strpos($effect_info['name'], 'textimage') === 0) {
      if (!is_array($style['textimage'])) {
        $style['textimage'] = empty($style['textimage']) ? array() : (array) unserialize($style['textimage']);
      }
      $style['textimage'] += self::defaultSettings();
      return TRUE;
    }
  }
  return FALSE;
}