function _views_watchdog_get_type in Views Watchdog 7.3
Same name and namespace in other branches
- 6.3 views_watchdog.module \_views_watchdog_get_type()
- 6.2 views_watchdog.module \_views_watchdog_get_type()
Helper function; retrieves list of watchdog types.
1 call to _views_watchdog_get_type()
- views_handler_filter_watchdog_type::get_value_options in views/
handlers/ views_handler_filter_watchdog_type.inc - Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.
File
- ./
views_watchdog.module, line 131 - This module extends the Views module and allows to create customized lists (pages, blocks, feeds) of watchdog entries.
Code
function _views_watchdog_get_type() {
$type =& drupal_static(__FUNCTION__);
if (!isset($type)) {
$type = array();
$result = db_query('SELECT DISTINCT(type) FROM {watchdog} ORDER BY type');
foreach ($result as $record) {
$type[] = $record->type;
}
}
return $type;
}