tmgmt_views_job_access.inc 537 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @file
  4. * Views access plugin.
  5. */
  6. /**
  7. * Access plugin that provides role-based access control.
  8. */
  9. class tmgmt_views_job_access extends views_plugin_access {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. function summary_title() {
  14. return t('Job view access');
  15. }
  16. /**
  17. * {@inheritdoc}
  18. */
  19. function access($account) {
  20. return entity_access('view', 'tmgmt_job', NULL, $account);
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. function get_access_callback() {
  26. return array('entity_access', array('view', 'tmgmt_job'));
  27. }
  28. }