Commit 6fe2c196 authored by drumm's avatar drumm
Browse files

Remove unnecessary file

parent 474986da
* @file
* Scan the 'default_views' subdirectory for default views by project_package.
* Implements hook_views_default_views().
function project_package_views_default_views() {
// Search the "default_views" subdirectory for files ending in .view.php.
$files = file_scan_directory(drupal_get_path('module', 'project_package') . '/views/default_views', '/view\.php$/');
foreach ($files as $absolute => $file) {
// This is not require_once because it's possible that
// hook_views_default_views() gets called more than once.
require $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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment