Projet

Général

Profil

Paste
Télécharger (582 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / tests / test_plugins / views_test_plugin_access_test_static.inc @ 76df55b7

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of views_test_plugin_access_test_static.
6
 */
7

    
8
/**
9
 * Tests a static access plugin.
10
 */
11
class views_test_plugin_access_test_static extends views_plugin_access {
12
  function option_definition() {
13
    $options = parent::option_definition();
14
    $options['access'] = array('default' => FALSE, 'bool' => TRUE);
15

    
16
    return $options;
17
  }
18

    
19
  function access($account) {
20
    return !empty($this->options['access']);
21
  }
22

    
23
  function get_access_callback() {
24
    return array('views_test_test_static_access_callback', array(!empty($options['access'])));
25
  }
26
}