You are here

function views_plugin_access_role::get_access_callback in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 plugins/views_plugin_access_role.inc \views_plugin_access_role::get_access_callback()
  2. 7.3 plugins/views_plugin_access_role.inc \views_plugin_access_role::get_access_callback()

Determine the access callback and arguments.

This information will be embedded in the menu in order to reduce performance hits during menu item access testing, which happens a lot.

Return value

an array; the first item should be the function to call, and the second item should be an array of arguments. The first item may also be TRUE (bool only) which will indicate no access control.)

Overrides views_plugin_access::get_access_callback

File

plugins/views_plugin_access_role.inc, line 11

Class

views_plugin_access_role
Access plugin that provides role-based access control.

Code

function get_access_callback() {
  return array(
    'views_check_roles',
    array(
      array_filter($this->options['role']),
    ),
  );
}