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/tests/test_plugins/views_test_plugin_access_test_static.inc
9 9
 * Tests a static access plugin.
10 10
 */
11 11
class views_test_plugin_access_test_static extends views_plugin_access {
12
  function option_definition() {
12

  
13
  /**
14
   * {@inheritdoc}
15
   */
16
  public function option_definition() {
13 17
    $options = parent::option_definition();
14 18
    $options['access'] = array('default' => FALSE, 'bool' => TRUE);
15 19

  
16 20
    return $options;
17 21
  }
18 22

  
19
  function access($account) {
23
  /**
24
   * {@inheritdoc}
25
   */
26
  public function access($account) {
20 27
    return !empty($this->options['access']);
21 28
  }
22 29

  
23
  function get_access_callback() {
30
  /**
31
   * {@inheritdoc}
32
   */
33
  public function get_access_callback() {
24 34
    return array('views_test_test_static_access_callback', array(!empty($options['access'])));
25 35
  }
36

  
26 37
}

Formats disponibles : Unified diff