You are here

static function gallery_config_gateway::get_types in Node Gallery 6

12 calls to gallery_config_gateway::get_types()
gallery_config::save in ./node_gallery.model.inc
gallery_config_gateway::is_type in ./node_gallery.model.inc
gallery_gateway::find_by in ./node_gallery.model.inc
node_gallery_config_list in ./node_gallery.admin.inc
@file Node gallery admin file.
node_gallery_link_alter in ./node_gallery.module
Implementation of hook_link_alter().

... See full list

File

./node_gallery.model.inc, line 34
Node gallery module.

Class

gallery_config_gateway

Code

static function get_types($op = 'gallery', $type = NULL) {
  static $types;
  if (empty($types)) {
    $result = db_query("SELECT name, gallery_type, image_type FROM {ng_gallery_config}");
    while ($o = db_fetch_object($result)) {
      $types['image'][$o->image_type] = $o;
      $types['gallery'][$o->gallery_type] = $o;
    }
  }
  return empty($type) ? $types[$op] : $types[$op][$type];
}