views_test_plugin_access_test_static.inc

Definition of views_test_plugin_access_test_static.

File

tests/test_plugins/views_test_plugin_access_test_static.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_test_plugin_access_test_static.
  5. */
  6. /**
  7. * Tests a static access plugin.
  8. */
  9. class views_test_plugin_access_test_static extends views_plugin_access {
  10. function option_definition() {
  11. $options = parent::option_definition();
  12. $options['access'] = array('default' => FALSE, 'bool' => TRUE);
  13. return $options;
  14. }
  15. function access($account) {
  16. return !empty($this->options['access']);
  17. }
  18. function get_access_callback() {
  19. return array('views_test_test_static_access_callback', array(!empty($options['access'])));
  20. }
  21. }