You are here

classified.views_default.inc in Classified Ads 7.3

Same filename and directory in other branches
  1. 6.3 views/classified.views_default.inc

Default Views for the classified module.

@copyright (c) 2010 Ouest Systemes Informatiques (OSInet)

@license General Public License version 2 or later

New code implementing a feature set derived from the ed_classified module:

---- Information about ed_classified ----

Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit: http://exodusdev.com/drupal/modules/ed_classified.module

Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights Reserved.

Licensed under the terms of the GNU Public License (GPL) version 2. Please see LICENSE.txt for license terms. Possession and use of this code signifies acceptance of license terms.

---- /ed-classified ----

File

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

/**
 * @file
 * Default Views for the classified module.
 *
 * @copyright (c) 2010 Ouest Systemes Informatiques (OSInet)
 *
 * @license General Public License version 2 or later
 *
 * New code implementing a feature set derived from the ed_classified module:
 *
 * ---- Information about ed_classified ----
 *
 * Michael Curry, Exodus Development, Inc.
 * exodusdev@gmail.com
 * for more information, please visit:
 *   http://exodusdev.com/drupal/modules/ed_classified.module
 *
 * Copyright (c) 2006, 2007 Exodus Development, Inc.  All Rights Reserved.
 *
 * Licensed under the terms of the GNU Public License (GPL) version 2.  Please
 * see LICENSE.txt for license terms.  Possession and use of this code signifies
 * acceptance of license terms.
 *
 * ---- /ed-classified ----
 */

/**
 * Implements hook_views_default_views().
 */
function classified_views_default_views() {
  $views = array();
  $path = drupal_get_path('module', 'classified') . '/views';
  foreach (file_scan_directory($path, '/.*\\.php$/') as $file) {

    // $view is redefined by the require_once. This is a safety net.
    $view = array();
    require_once DRUPAL_ROOT . '/' . $file->filename;

    // phpcs:disable
    $views[$view->name] = $view;

    // phpcs:enabled
  }
  return $views;
}

Functions