/php/rights_tool.class.php

https://bitbucket.org/chamilo/chamilo-app-weblcms-rights/ · PHP · 55 lines · 20 code · 8 blank · 27 comment · 0 complexity · 44a8fb3d1a5d208a014b1e3e7cb06909 MD5 · raw file

  1. <?php
  2. namespace application\weblcms\tool\rights;
  3. use application\weblcms\Tool;
  4. /**
  5. * $Id: rights_tool.class.php 216 2009-11-13 14:08:06Z kariboe $
  6. * @package application.lib.weblcms.tool.rights
  7. */
  8. /**
  9. * This tool allows a user to manage rights in his or her course.
  10. */
  11. class RightsTool extends Tool
  12. {
  13. const DEFAULT_ACTION = self :: ACTION_EDIT_RIGHTS;
  14. function get_application_component_path()
  15. {
  16. return dirname(__FILE__) . '/component/';
  17. }
  18. /**
  19. * Helper function for the SubManager class,
  20. * pending access to class constants via variables in PHP 5.3
  21. * e.g. $name = $class :: DEFAULT_ACTION
  22. *
  23. * DO NOT USE IN THIS SUBMANAGER'S CONTEXT
  24. * Instead use:
  25. * - self :: DEFAULT_ACTION in the context of this class
  26. * - YourSubManager :: DEFAULT_ACTION in all other application classes
  27. */
  28. static function get_default_action()
  29. {
  30. return self :: DEFAULT_ACTION;
  31. }
  32. /**
  33. * Helper function for the SubManager class,
  34. * pending access to class constants via variables in PHP 5.3
  35. * e.g. $name = $class :: PARAM_ACTION
  36. *
  37. * DO NOT USE IN THIS SUBMANAGER'S CONTEXT
  38. * Instead use:
  39. * - self :: PARAM_ACTION in the context of this class
  40. * - YourSubManager :: PARAM_ACTION in all other application classes
  41. */
  42. static function get_action_parameter()
  43. {
  44. return self :: PARAM_ACTION;
  45. }
  46. }
  47. ?>