You are here

function textimage_get_presets in Textimage 5.2

Same name and namespace in other branches
  1. 5 textimage.module \textimage_get_presets()
  2. 6.2 textimage_admin.inc \textimage_get_presets()
  3. 7.2 textimage.module \textimage_get_presets()
6 calls to textimage_get_presets()
textimage_field_formatter_info in ./textimage.module
Implementation of hook_field_formatter_info().
textimage_preset_edit in ./textimage_admin.inc
textimage_preset_list in ./textimage_admin.inc
textimage_update_2 in ./textimage.install
textimage_update_3 in ./textimage.install

... See full list

File

./textimage_admin.inc, line 642

Code

function textimage_get_presets() {
  static $presets = array();
  if (empty($presets)) {
    $result = db_query("SELECT pid, name, description, settings FROM {textimage_preset} ORDER BY name");
    $presets = array();
    while ($preset = db_fetch_object($result)) {
      $preset->settings = unserialize($preset->settings);
      $presets[$preset->name] = $preset;
    }
  }
  return $presets;
}