function _cache_actions_get_views_displays in Cache Actions 7.2
Same name and namespace in other branches
- 7 cache_actions.rules.inc \_cache_actions_get_views_displays()
Get all views and their displays. This is a callback for an options list.
Return value
array List of all views and their displays.
1 string reference to '_cache_actions_get_views_displays'
- cache_actions_rules_action_info in ./
cache_actions.rules.inc - Implements hook_rules_action_info().
File
- ./
cache_actions.rules.inc, line 301 - This file provides the rules integration for this module.
Code
function _cache_actions_get_views_displays() {
$views = views_get_all_views();
$displays = array();
foreach ($views as $view) {
$displays[$view->name] = array();
foreach ($view->display as $display) {
// Only list views that actually is shown.
if ($display->id != 'default') {
$displays[$view->name][$view->name . ':' . $display->id] = !empty($display->title) ? $display->title : $display->id;
}
}
}
return $displays;
}