123456789101112131415161718192021 |
- <?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;
- }
|