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_access_perm.inc
11 11
 * @ingroup views_access_plugins
12 12
 */
13 13
class views_plugin_access_perm extends views_plugin_access {
14
  function access($account) {
14

  
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function access($account) {
15 19
    return views_check_perm($this->options['perm'], $account);
16 20
  }
17 21

  
18
  function get_access_callback() {
22
  /**
23
   * {@inheritdoc}
24
   */
25
  public function get_access_callback() {
19 26
    return array('views_check_perm', array($this->options['perm']));
20 27
  }
21 28

  
22
  function summary_title() {
29
  /**
30
   * {@inheritdoc}
31
   */
32
  public function summary_title() {
23 33
    $permissions = module_invoke_all('permission');
24 34
    if (isset($permissions[$this->options['perm']])) {
25 35
      return $permissions[$this->options['perm']]['title'];
......
29 39
  }
30 40

  
31 41

  
32
  function option_definition() {
42
  /**
43
   * {@inheritdoc}
44
   */
45
  public function option_definition() {
33 46
    $options = parent::option_definition();
34 47
    $options['perm'] = array('default' => 'access content');
35 48

  
36 49
    return $options;
37 50
  }
38 51

  
39
  function options_form(&$form, &$form_state) {
52
  /**
53
   * {@inheritdoc}
54
   */
55
  public function options_form(&$form, &$form_state) {
40 56
    parent::options_form($form, $form_state);
41 57
    $perms = array();
42 58
    $module_info = system_get_info('module');
43 59

  
44
    // Get list of permissions
60
    // Get list of permissions.
45 61
    foreach (module_implements('permission') as $module) {
46 62
      $permissions = module_invoke($module, 'permission');
47 63
      foreach ($permissions as $name => $perm) {
......
59 75
      '#description' => t('Only users with the selected permission flag will be able to access this display. Note that users with "access all views" can see any view, regardless of other permissions.'),
60 76
    );
61 77
  }
78

  
62 79
}

Formats disponibles : Unified diff