Projet

Général

Profil

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

root / drupal7 / sites / all / modules / advanced_forum / includes / panels / advanced_forum.pages_default.inc @ 024de6ea

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
  if (variable_get('advanced_forum_autoload_page_handlers', TRUE)) {
17

    
18
    static $handlers = array();
19

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

    
31
    return $handlers;
32
  }
33
}