You are here

function finder_views_get_views in Finder 6

Same name and namespace in other branches
  1. 7 modules/finder_views/finder_views.module \finder_views_get_views()

Get an array of content types for use in select forms.

1 call to finder_views_get_views()
finder_views_form_finder_admin_edit_alter in modules/finder_views/finder_views.module
Implementation of hook_form_FORM_ID_alter().

File

modules/finder_views/finder_views.module, line 297
The finder views module.

Code

function finder_views_get_views() {
  $views = array(
    '' => t(' - Select a view - '),
  );
  $all_views = views_get_all_views();
  if (!empty($all_views)) {
    foreach ($all_views as $view) {
      if ($view->type == 'Default') {
        $views[t('Default Views')][$view->name] = $view->name;
      }
      else {
        $views[t('Existing Views')][$view->name] = $view->name;
      }
    }
    return $views;
  }
  return FALSE;
}