Projet

Général

Profil

Paste
Télécharger (742 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / advanced_forum / includes / panels / advanced_forum.pages_default.inc @ 13c3c9b4

1
<?php
2

    
3
/**
4
 * @file
5
 * Default panel handlers for Advanced Forum.
6
 */
7

    
8
/**
9
 * Loads the included panels.
10
 *
11
 * This function is used instead of panels ability to autodiscover a panels
12
 * export .inc because this allows us to put each page in its own file.
13
 * Thanks to Moshe and OG for the code.
14
 */
15
function advanced_forum_default_page_manager_handlers() {
16
  static $handlers = array();
17

    
18
  if (empty($handlers)) {
19
    $files = file_scan_directory(drupal_get_path('module', 'advanced_forum') . '/includes/panels', '/\.handler$/');
20
    foreach ($files as $absolute => $file) {
21
      $handler = NULL;
22
      require_once $absolute;
23
      if (isset($handler)) {
24
        $handlers[$file->name] = $handler;
25
      }
26
    }
27
  }
28

    
29
  return $handlers;
30
}