function eva_get_views

cis7 eva.module eva_get_views($type = NULL, $reset = FALSE)
cle7 eva.module eva_get_views($type = NULL, $reset = FALSE)
elmsmedia7 eva.module eva_get_views($type = NULL, $reset = FALSE)
icor7 eva.module eva_get_views($type = NULL, $reset = FALSE)
meedjum_blog7 eva.module eva_get_views($type = NULL, $reset = FALSE)
mooc7 eva.module eva_get_views($type = NULL, $reset = FALSE)

Get a list of views and displays attached to speficic entities.

This function will cache its results into the views cache, so it gets cleared by Views appropriately.


$type: The entity type we want to retrieve views for. If NULL is specified, views for all entity types will be returned.

$reset: Force a rebuild of the data.

Return value

An array of view name/display name values, or an empty array().

2 calls to eva_get_views()
eva_entity_view_alter in sites/all/modules/ulmus/eva/eva.module
Implements hook_entity_view_alter().
eva_field_extra_fields in sites/all/modules/ulmus/eva/eva.module
Implements hook_content_extra_fields().
2 string references to 'eva_get_views'
eva_modules_disabled in sites/all/modules/ulmus/eva/eva.module
Implements hook_modules_disabled().
eva_modules_enabled in sites/all/modules/ulmus/eva/eva.module
Implements hook_modules_enabled().


sites/all/modules/ulmus/eva/eva.module, line 109


function eva_get_views($type = NULL, $reset = FALSE) {
  $used_views = &drupal_static(__FUNCTION__);

  if (!isset($used_views) || $reset) {

    // If we're not resetting, check the Views cache.
    if (!$reset) {
      $cache = views_cache_get("eva");
      if (isset($cache->data)) {
        $used_views = $cache->data;

    // If it's still empty rebuild it.
    if (!isset($used_views)) {
      // Trigger a rebuild of the views object cache, which may not be fully loaded.

      // Build and cache the data, both in the DB and statically.
      $views = views_get_applicable_views('uses hook entity view');
      foreach ($views as $data) {
        list($view, $display_id) = $data;
        $view_entity = $view->display_handler->get_option('entity_type');
        // Initialize handlers, to determine if the view uses exposed filters.
        $used_views[$view_entity][] = array(
          'name' => $view->name,
          'title' => 'EVA: ' . $view->get_human_name() . ' - ' . $view->display[$display_id]->display_title,
          'display' => $display_id,
          'bundles' => $view->display_handler->get_option('bundles'),
          'exposed form' => $view->display_handler->uses_exposed(),
      views_cache_set("eva", $used_views);

  // Now spit back the data.
  if (isset($type) & isset($used_views)) {
    return isset($used_views[$type]) ? $used_views[$type] : array();
  else {
    return isset($used_views) ? $used_views : array();



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.