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_validate.inc
2 2

  
3 3
/**
4 4
 * @file
5
 * Contains the base argument validator plugin.
5
 * Definition of views_plugin_argument_validate.
6 6
 */
7 7

  
8 8
/**
......
19 19
class views_plugin_argument_validate extends views_plugin {
20 20

  
21 21
  /**
22
   * Initialize this plugin with the view and the argument
23
   * it is linked to.
22
   * Initialize this plugin with the view and the argument it is linked to.
24 23
   */
25
  function init(&$view, &$argument, $options) {
24
  public function init(&$view, &$argument, $options) {
26 25
    $this->view = &$view;
27 26
    $this->argument = &$argument;
28 27

  
......
31 30
  }
32 31

  
33 32
  /**
34
   * Retrieve the options when this is a new access
35
   * control plugin
33
   * Retrieve the options when this is a new access control plugin.
36 34
   */
37
  function option_definition() { return array(); }
35
  public function option_definition() {
36
    return array();
37
  }
38 38

  
39 39
  /**
40 40
   * Provide the default form for setting options.
41 41
   */
42
  function options_form(&$form, &$form_state) { }
42
  public function options_form(&$form, &$form_state) {
43
  }
43 44

  
44 45
  /**
45
   * Provide the default form form for validating options
46
   * Provide the default form form for validating options.
46 47
   */
47
  function options_validate(&$form, &$form_state) { }
48
  public function options_validate(&$form, &$form_state) {
49
  }
48 50

  
49 51
  /**
50 52
   * Provide the default form form for submitting options
51 53
   */
52
  function options_submit(&$form, &$form_state, &$options = array()) { }
54
  public function options_submit(&$form, &$form_state, &$options = array()) {
55
  }
53 56

  
54 57
  /**
55 58
   * Convert options from the older style.
......
59 62
   * move arguments from the old style to the new style. See
60 63
   * views_plugin_argument_default_fixed for a good example of this method.
61 64
   */
62
  function convert_options(&$options) { }
65
  public function convert_options(&$options) {
66
  }
63 67

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

  
69 75
  /**
70 76
   * If we don't have access to the form but are showing it anyway, ensure that
......
73 79
   * This is only called by child objects if specified in the options_form(),
74 80
   * so it will not always be used.
75 81
   */
76
  function check_access(&$form, $option_name) {
82
  public function check_access(&$form, $option_name) {
77 83
    if (!$this->access()) {
78 84
      $form[$option_name]['#disabled'] = TRUE;
79 85
      $form[$option_name]['#value'] = $form[$this->option_name]['#default_value'];
......
81 87
    }
82 88
  }
83 89

  
84
  function validate_argument($arg) { return TRUE; }
90
  /**
91
   * {@inheritdoc}
92
   */
93
  public function validate_argument($arg) {
94
    return TRUE;
95
  }
85 96

  
86 97
  /**
87 98
   * Process the summary arguments for displaying.
......
91 102
   * for a faster query. But there are use cases where you want to use
92 103
   * the old value again, for example the summary.
93 104
   */
94
  function process_summary_arguments(&$args) { }
105
  public function process_summary_arguments(&$args) {
106
  }
107

  
95 108
}
96 109

  
97 110
/**

Formats disponibles : Unified diff