21 lines
467 B
PHP
21 lines
467 B
PHP
<?php
|
|
/**
|
|
* @file
|
|
* Views hooks for Wing.
|
|
*/
|
|
|
|
/**
|
|
* Implements hook_views_default_views().
|
|
*/
|
|
function wing_views_default_views() {
|
|
$path = drupal_get_path('module', 'wing') . '/views';
|
|
$di = new DirectoryIterator($path);
|
|
$views = array();
|
|
foreach ($di as $file) {
|
|
if ($file->isFile() && preg_match('/^wing-.*\.view\.inc$/', $file->getFilename())) {
|
|
require $file->getPathname();
|
|
$views[$view->name] = $view;
|
|
}
|
|
}
|
|
return $views;
|
|
}
|