function openlayers_views_get_views in Openlayers 7.3
Return all views compatible with this module.
Return value
array[] List of views id and display names.
1 call to openlayers_views_get_views()
- openlayers_views_default_openlayers_sources in modules/
openlayers_views/ includes/ openlayers_views.default_openlayers_sources.inc - @file Default sources from views.
File
- modules/
openlayers_views/ openlayers_views.module, line 33 - Openlayers views integration.
Code
function openlayers_views_get_views() {
$views = array();
/** @var view $view */
foreach (views_get_all_views() as $view) {
foreach (array_keys($view->display) as $display) {
if ($display != 'default') {
$view
->set_display($display);
if ($view->display_handler
->get_option('style_plugin') == 'openlayers_source_vector') {
$views[] = array(
'openlayers_source_vector',
$view,
$display,
);
}
if ($view->display_handler
->get_option('style_plugin') == 'openlayers_map_views') {
$views[] = array(
'openlayers_map_views',
$view,
$display,
);
}
}
}
}
return $views;
}