5 * Definition of views_test_plugin_access_test_dynamic.
9 * Tests a dynamic access plugin.
11 class views_test_plugin_access_test_dynamic extends views_plugin_access {
12 function option_definition() {
13 $options = parent::option_definition();
14 $options['access'] = array('default' => FALSE, 'bool' => TRUE);
19 function access($account) {
20 return !empty($this->options['access']) && isset($this->view->args[0]) && $this->view->args[0] == variable_get('test_dynamic_access_argument1', NULL) && isset($this->view->args[1]) && $this->view->args[1] == variable_get('test_dynamic_access_argument2', NULL);
23 function get_access_callback() {
24 return array('views_test_test_dynamic_access_callback', array(!empty($options['access']), 1, 2));