Projet

Général

Profil

Révision 136a805a

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/includes/context.inc
42 42
  var $restrictions = array();
43 43
  var $empty = FALSE;
44 44

  
45
  function ctools_context($type = 'none', $data = NULL) {
45
  function __construct($type = 'none', $data = NULL) {
46 46
    $this->type  = $type;
47 47
    $this->data  = $data;
48 48
    $this->title = t('Unknown context');
......
119 119
   * @param ...
120 120
   *   One or more keywords to use for matching which contexts are allowed.
121 121
   */
122
  function ctools_context_required($title) {
122
  function __construct($title) {
123 123
    $args = func_get_args();
124 124
    $this->title = array_shift($args);
125 125

  
......
204 204
 */
205 205
class ctools_context_optional extends ctools_context_required {
206 206
  var $required = FALSE;
207
  function ctools_context_optional() {
208
    $args = func_get_args();
209
    call_user_func_array(array($this, 'ctools_context_required'), $args);
210
  }
211 207

  
212 208
  /**
213 209
   * Add the 'empty' context which is possible for optional
......
1163 1159
  }
1164 1160

  
1165 1161
  foreach ($required as $r) {
1166
    $context = clone(array_shift($contexts));
1162
    $context = clone array_shift($contexts);
1167 1163
    $context->identifier = $r['identifier'];
1168 1164
    $context->page_title = isset($r['title']) ? $r['title'] : '';
1169 1165
    $context->keyword    = $r['keyword'];

Formats disponibles : Unified diff