Projet

Général

Profil

Révision 5d12d676

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/plugins/views_plugin_argument_default.inc
17 17
 * The fixed argument default handler; also used as the base.
18 18
 */
19 19
class views_plugin_argument_default extends views_plugin {
20

  
20 21
  /**
21 22
   * Return the default argument.
22 23
   *
23
   * This needs to be overridden by every default argument handler to properly do what is needed.
24
   * This needs to be overridden by every default argument handler to properly
25
   * do what is needed.
24 26
   */
25
  function get_argument() { }
27
  public function get_argument() {
28
  }
26 29

  
27 30
  /**
28
   * Initialize this plugin with the view and the argument
29
   * it is linked to.
31
   * Initialize this plugin with the view and the argument it is linked to.
30 32
   */
31
  function init(&$view, &$argument, $options) {
33
  public function init(&$view, &$argument, $options) {
32 34
    $this->view = &$view;
33 35
    $this->argument = &$argument;
34 36

  
......
37 39
  }
38 40

  
39 41
  /**
40
   * Retrieve the options when this is a new access
41
   * control plugin
42
   * Retrieve the options when this is a new access control plugin.
42 43
   */
43
  function option_definition() { return array(); }
44
  public function option_definition() {
45
    return array();
46
  }
44 47

  
45 48
  /**
46 49
   * Provide the default form for setting options.
47 50
   */
48
  function options_form(&$form, &$form_state) { }
51
  public function options_form(&$form, &$form_state) {
52
  }
49 53

  
50 54
  /**
51
   * Provide the default form form for validating options
55
   * Provide the default form form for validating options.
52 56
   */
53
  function options_validate(&$form, &$form_state) { }
57
  public function options_validate(&$form, &$form_state) {
58
  }
54 59

  
55 60
  /**
56
   * Provide the default form form for submitting options
61
   * Provide the default form form for submitting options.
57 62
   */
58
  function options_submit(&$form, &$form_state, &$options = array()) { }
63
  public function options_submit(&$form, &$form_state, &$options = array()) {
64
  }
59 65

  
60 66
  /**
61
   * Determine if the administrator has the privileges to use this
62
   * plugin
67
   * Determine if the administrator has the privileges to use this plugin.
63 68
   */
64
  function access() { return TRUE; }
69
  public function access() {
70
    return TRUE;
71
  }
65 72

  
66 73
  /**
67 74
   * If we don't have access to the form but are showing it anyway, ensure that
......
70 77
   * This is only called by child objects if specified in the options_form(),
71 78
   * so it will not always be used.
72 79
   */
73
  function check_access(&$form, $option_name) {
80
  public function check_access(&$form, $option_name) {
74 81
    if (!$this->access()) {
75 82
      $form[$option_name]['#disabled'] = TRUE;
76 83
      $form[$option_name]['#value'] = $form[$this->option_name]['#default_value'];
......
86 93
   * move arguments from the old style to the new style. See
87 94
   * views_plugin_argument_default_fixed for a good example of this method.
88 95
   */
89
  function convert_options(&$options) { }
96
  public function convert_options(&$options) {
97
  }
98

  
90 99
}
91 100

  
92 101
/**

Formats disponibles : Unified diff