Projet

Général

Profil

Révision 64156087

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/panels/includes/legacy.inc
1 1
<?php
2 2

  
3
/**
4
 * @file
5
 * Legacy state manager for Panels.
6
 */
7

  
3 8
/**
4 9
 * Legacy state manager for Panels.
5 10
 *
6 11
 * Checks all possible ways (using discovery of patterned method names) in which
7 12
 * Panels may need to operate in legacy mode,
8
 * sets variables as appropriate, and returns an informational
9
 *
13
 * sets variables as appropriate, and returns an informational.
10 14
 */
11 15
class PanelsLegacyState {
12 16
  var $legacy = NULL;
13 17

  
18
  /**
19
   * Translation wrapper.
20
   */
14 21
  function t() {
15 22
    $func = get_t();
16 23
    $args = func_get_args();
17 24
    return call_user_func_array($func, $args);
18 25
  }
19 26

  
27
  /**
28
   * Get Status.
29
   */
20 30
  function getStatus() {
21 31
    if (!isset($this->legacy)) {
22 32
      $this->determineStatus();
......
29 39
   */
30 40
  function determineStatus() {
31 41
    $this->legacy = array();
32
    foreach(get_class_methods($this) as $method) {
42
    foreach (get_class_methods($this) as $method) {
33 43
      if (strtolower(substr($method, 0, 5)) == 'check') {
34 44
        $this->legacy[$method] = $this->$method();
35 45
      }
......
37 47
    $this->legacy = array_filter($this->legacy);
38 48
  }
39 49

  
40
  // At this time there are no legacy checks.
41 50
}

Formats disponibles : Unified diff