function kaltura_get_relevant_views in Kaltura 6
Same name and namespace in other branches
- 5 plugins/kaltura_playlist/kaltura_playlist.module \kaltura_get_relevant_views()
- 6.2 plugins/kaltura_playlist/kaltura_playlist.module \kaltura_get_relevant_views()
2 calls to kaltura_get_relevant_views()
- kaltura_playlist_form in plugins/
kaltura_playlist/ kaltura_playlist.module - kaltura_populate_nodes in plugins/
kaltura_playlist/ kaltura_playlist.install
File
- plugins/
kaltura_playlist/ kaltura_playlist.module, line 130
Code
function kaltura_get_relevant_views() {
$views = views_get_all_views();
//var_dump($views);
$relevant_views = array();
if (!is_array($views) || !count($views)) {
return $relevant_views;
}
foreach ($views as $view_name => $view) {
if ($view->disabled) {
continue;
}
foreach ($view->display as $display) {
if ($display->display_plugin == 'default') {
// has a feed output, let's see if entryId is a field
if (isset($display->display_options['fields']['kaltura_entryId'])) {
$relevant_views[$view->name . '|' . $display->id] = $view_name;
}
}
}
}
return $relevant_views;
}