You are here

function weather_get_displays_in_use in Weather 7.3

Same name and namespace in other branches
  1. 7 weather.module \weather_get_displays_in_use()
  2. 7.2 weather.common.inc \weather_get_displays_in_use()

Get all currently used displays.

Parameters

string $type: Display type.

Return value

array Array of sorted displays.

3 calls to weather_get_displays_in_use()
weather_admin_main_page in ./weather.forms.inc
Show an overview of configured displays and the default display.
weather_block_info in ./weather.module
Implements hook_block_info().
weather_display_config_form_submit in ./weather.forms.inc
Implements hook_form_submit().

File

./weather.common.inc, line 113
Common functions in a separate file to reduce size of weather.module.

Code

function weather_get_displays_in_use($type = 'system-wide') {
  return db_query('SELECT number FROM {weather_displays} WHERE type=:type ORDER BY number ASC', array(
    ':type' => $type,
  ))
    ->fetchCol();
}