You are here

signup.views_default.inc in Signup 6.2

Same filename and directory in other branches
  1. 6 views/signup.views_default.inc
  2. 7 views/signup.views_default.inc

Provides default views on behalf of the signup module.

File

views/signup.views_default.inc
View source
<?php

/**
 * @file
 * Provides default views on behalf of the signup module.
 */

/**
 * Implementation of hook_views_default_views().
 */
function signup_views_default_views() {

  // Search the "default_views" directory for files ending in .view.php.
  $files = file_scan_directory(drupal_get_path('module', 'signup') . '/views/default_views', 'view.php');
  foreach ($files as $absolute => $file) {
    if (strpos($file->name, '_vbo_') !== FALSE && !module_exists('views_bulk_operations')) {

      // This is a VBO-specific view, but we don't have VBO, so skip it.
      continue;
    }
    require_once $absolute;
    if (isset($view)) {

      // $file->name has the ".php" stripped off, but still has the ".view".
      $view_name = substr($file->name, 0, strrpos($file->name, '.'));
      $views[$view_name] = $view;
    }
  }
  return $views;
}

Functions

Namesort descending Description
signup_views_default_views Implementation of hook_views_default_views().