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/handlers/views_handler_argument_null.inc
11 11
 * @ingroup views_argument_handlers
12 12
 */
13 13
class views_handler_argument_null extends views_handler_argument {
14
  function option_definition() {
14

  
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function option_definition() {
15 19
    $options = parent::option_definition();
16 20
    $options['must_not_be'] = array('default' => FALSE, 'bool' => TRUE);
17 21
    return $options;
......
21 25
   * Override options_form() so that only the relevant options
22 26
   * are displayed to the user.
23 27
   */
24
  function options_form(&$form, &$form_state) {
28
  public function options_form(&$form, &$form_state) {
25 29
    parent::options_form($form, $form_state);
26 30
    $form['must_not_be'] = array(
27 31
      '#type' => 'checkbox',
......
38 42
   * Override default_actions() to remove actions that don't
39 43
   * make sense for a null argument.
40 44
   */
41
  function default_actions($which = NULL) {
45
  public function default_actions($which = NULL) {
42 46
    if ($which) {
43 47
      if (in_array($which, array('ignore', 'not found', 'empty', 'default'))) {
44 48
        return parent::default_actions($which);
......
51 55
    return $actions;
52 56
  }
53 57

  
54
  function validate_argument_basic($arg) {
58
  /**
59
   * {@inheritdoc}
60
   */
61
  public function validate_argument_basic($arg) {
55 62
    if (!empty($this->options['must_not_be'])) {
56 63
      return !isset($arg);
57 64
    }
......
63 70
   * Override the behavior of query() to prevent the query
64 71
   * from being changed in any way.
65 72
   */
66
  function query($group_by = FALSE) {}
73
  public function query($group_by = FALSE) {
74
  }
75

  
67 76
}

Formats disponibles : Unified diff