You are here

function weather_get_displays_in_use in Weather 7

Same name and namespace in other branches
  1. 7.3 weather.common.inc \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
Implement hook_block_info().
weather_display_settings_form_submit in ./weather.forms.inc
Implement hook_form_submit().

File

./weather.module, line 415
Display current weather data from many places in the world.

Code

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