views_get_all_views

contributions/views/views.module, line 792

Versions
6
views_get_all_views($reset = FALSE)

Return an array of all views as fully loaded $view objects.

Parameters

$reset If TRUE, reset the static cache forcing views to be reloaded.

▾ 18 functions call views_get_all_views()

acquia_agent_update_6000 in contributions/acquia_connector/acquia_agent/acquia_agent.install
Warn users who are upgrading from a pre-release version of CCK about any broken Views on their site.
draggableviews_theme in contributions/draggableviews/draggableviews.module
Implement hook_theme
img_assist_admin_settings in contributions/img_assist/img_assist.module
Implementation of hook_settings().
install_custom_pagers_add_pager in contributions/install_profile_api/contrib/custom_pagers.inc
Create a custom pager.
nodecomment_form_alter in contributions/nodecomment/nodecomment.module
Implementation of hook_form_alter().
nodereference_field_settings in contributions/cck/modules/nodereference/nodereference.module
Implementation of hook_field_settings().
signup_settings_form in contributions/signup/includes/admin.settings.inc
Form builder for the settings page under admin/setttings/signup
template_preprocess_views_ui_list_views in contributions/views/includes/admin.inc
Preprocess the list views theme
userreference_field_settings in contributions/cck/modules/userreference/userreference.module
Implementation of hook_field_settings().
views_block in contributions/views/views.module
Implementation of hook_block
views_content_views_content_type_content_types in contributions/ctools/views_content/plugins/content_types/views.inc
Return all content types available.
views_content_views_panes_content_type_content_types in contributions/ctools/views_content/plugins/content_types/views_panes.inc
Return all content types available.
views_export_export_form in contributions/views/views_export/views_export.module
Form to choose a group of views to export.
views_get_all_views in contributions/views/views.module
Return an array of all views as fully loaded $view objects.
views_get_applicable_views in contributions/views/views.module
Return a list of all views and display IDs that have a particular setting in their display's plugin settings.
views_ui_admin_convert in contributions/views/includes/convert.inc
Page callback for the tools - Views 1 convert page
views_views_exportables in contributions/views/views.module
Implementation of hook_views_exportables().
_context_ui_contrib_get_views in contributions/context/context_ui/context_ui_contrib.module
Helper function to generate a list of database and module provided views.

Code

<?php
function views_get_all_views($reset = FALSE) {
  static $views = array();

  if (empty($views) || $reset) {
    $views = array();

    // First, get all applicable views.
    views_include('view');
    $views = view::load_views();

    // Get all default views.
    $status = variable_get('views_defaults', array());

    foreach (views_discover_default_views() as $view) {
      // Determine if default view is enabled or disabled.
      if (isset($status[$view->name])) {
        $view->disabled = $status[$view->name];
      }

      // If overridden, also say so.
      if (!empty($views[$view->name])) {
        $views[$view->name]->type = t('Overridden');
      }
      else {
        $view->type = t('Default');
        $views[$view->name] = $view;
      }
    }

  }
  return $views;
}
?>