hosting_package_plugin_access.inc

Classes

Namesort descending Description
hosting_package_plugin_access Access plugin that provides access control for package views.

File

package/includes/views/plugins/hosting_package_plugin_access.inc
View source
  1. <?php
  2. /**
  3. * Access plugin that provides access control for package views.
  4. */
  5. class hosting_package_plugin_access extends views_plugin_access {
  6. /**
  7. * Return a string to display as the clickable title for the
  8. * access control.
  9. */
  10. function summary_title() {
  11. return t('Hosting package');
  12. }
  13. /**
  14. * Determine the access callback and arguments.
  15. *
  16. * This information will be embedded in the menu in order to reduce
  17. * performance hits during menu item access testing, which happens
  18. * a lot.
  19. *
  20. * @return an array; the first item should be the function to call,
  21. * and the second item should be an array of arguments. The first
  22. * item may also be TRUE (bool only) which will indicate no
  23. * access control.)
  24. */
  25. function get_access_callback() {
  26. return array('hosting_package_views_access', array($this->display->display_plugin, $this->display->id));
  27. }
  28. /**
  29. * Determine if the current user has access or not.
  30. */
  31. function access($account) {
  32. return hosting_package_views_access($this->display->display_plugin, $this->display->id, $account);
  33. }
  34. }