• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

tests/test_plugins/views_test_plugin_access_test_dynamic.inc

00001 <?php
00002 
00003 class views_test_plugin_access_test_dynamic extends views_plugin_access {
00004   function option_definition() {
00005     $options = parent::option_definition();
00006     $options['access'] = array('default' => FALSE);
00007 
00008     return $options;
00009   }
00010 
00011   function access($account) {
00012     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);
00013   }
00014 
00015   function get_access_callback() {
00016     return array('views_test_test_dynamic_access_callback', array(!empty($options['access']), 1, 2));
00017   }
00018 }

Generated on Sun Feb 26 2012 12:52:52 for Views by  doxygen 1.7.1