logout.class.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * @package modx
  4. * @subpackage manager.controllers
  5. */
  6. class SecurityLogoutManagerController extends modManagerController {
  7. /**
  8. * Check for any permissions or requirements to load page
  9. * @return bool
  10. */
  11. public function checkPermissions() {
  12. return true;
  13. }
  14. /**
  15. * Register custom CSS/JS for the page
  16. * @return void
  17. */
  18. public function loadCustomCssJs() {}
  19. /**
  20. * Custom logic code here for setting placeholders, etc
  21. * @param array $scriptProperties
  22. * @return mixed
  23. */
  24. public function process(array $scriptProperties = array()) {
  25. $this->modx->runProcessor('security/logout');
  26. $url = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
  27. $this->modx->sendRedirect($url);
  28. }
  29. /**
  30. * Return the pagetitle
  31. *
  32. * @return string
  33. */
  34. public function getPageTitle() {
  35. return $this->modx->lexicon('logout');
  36. }
  37. /**
  38. * Return the location of the template file
  39. * @return string
  40. */
  41. public function getTemplateFile() {
  42. return 'security/logout.tpl';
  43. }
  44. /**
  45. * Specify the language topics to load
  46. * @return array
  47. */
  48. public function getLanguageTopics() {
  49. return array('access','user');
  50. }
  51. }