You are here

function markup_view_get_list_of_views in Markup 6

1 call to markup_view_get_list_of_views()
markup_view_field_settings in contrib/markup_view/markup_view.module
Implements hook_field_settings().

File

contrib/markup_view/markup_view.module, line 278
Defines a field type for displaying a view on the node/edit form.

Code

function markup_view_get_list_of_views() {
  static $views = array();
  if (!empty($views)) {
    return $views;
  }
  $all_views = views_get_all_views();
  $views[''] = t('None');
  foreach ((array) $all_views as $view_name => $view) {
    foreach ((array) $view->display as $display_key => $display) {
      $title = ucfirst($view_name) . ' - ' . $display->display_title;

      // Build return array.
      $views[$view_name . '|' . $display->id] = $title;
    }
  }
  return $views;
}