You are here

function DynamicTest::get_access_callback in Views (for Drupal 7) 8.3

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

array The first item of the array 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 AccessPluginBase::get_access_callback

File

tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/access/DynamicTest.php, line 36
Definition of Drupal\views_test_data\Plugin\views\access\DynamicTest.

Class

DynamicTest
Tests a dynamic access plugin.

Namespace

Drupal\views_test_data\Plugin\views\access

Code

function get_access_callback() {
  return array(
    'views_test_data_test_dynamic_access_callback',
    array(
      !empty($options['access']),
      1,
      2,
    ),
  );
}