Projet

Général

Profil

Révision c304a780

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/plugins/arguments/string.inc
2 2

  
3 3
/**
4 4
 * @file
5
 *
6
 * Plugin to provide an argument handler for a raw string
5
 * Plugin to provide an argument handler for a raw string.
7 6
 */
7

  
8 8
/**
9 9
 * Plugins are described by creating a $plugin array which will be used
10 10
 * by the system that includes this file.
11 11
 */
12 12
$plugin = array(
13 13
  'title' => t("String"),
14
  // keyword to use for %substitution
14
  // Keyword to use for %substitution.
15 15
  'keyword' => 'string',
16 16
  'description' => t('A string is a minimal context that simply holds a string that can be used for some other purpose.'),
17 17
  'settings form' => 'ctools_string_settings_form',
......
20 20
    '#type' => 'textfield',
21 21
    '#description' => t('Enter a value for this argument'),
22 22
  ),
23
  'path placeholder' => 'ctools_string_path_placeholder', // This is in pagemanager.
23
// This is in pagemanager.
24
  'path placeholder' => 'ctools_string_path_placeholder',
24 25
);
25 26

  
26 27
/**
......
39 40
}
40 41

  
41 42
/**
42
 * Settings form for the argument
43
 * Settings form for the argument.
43 44
 */
44 45
function ctools_string_settings_form(&$form, &$form_state, $conf) {
45 46
  $form['settings']['use_tail'] = array(
......
48 49
    '#default_value' => !empty($conf['use_tail']),
49 50
    '#description' => t('If checked, this string will include all arguments. For example, if the path is "path/%" and the user visits "path/foo/bar", if this is not checked the string will be "foo". If it is checked the string will be "foo/bar".'),
50 51
  );
51
//  return $form;
52 52
}
53 53

  
54 54
/**
......
61 61
  else {
62 62
    return '%pm_arg_tail';
63 63
  }
64
}
64
}

Formats disponibles : Unified diff