logout.class.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /*
  3. * This file is part of MODX Revolution.
  4. *
  5. * Copyright (c) MODX, LLC. All Rights Reserved.
  6. *
  7. * For complete copyright and license information, see the COPYRIGHT and LICENSE
  8. * files found in the top-level directory of this distribution.
  9. */
  10. class SecurityLogoutManagerController extends modManagerController {
  11. /**
  12. * Check for any permissions or requirements to load page
  13. * @return bool
  14. */
  15. public function checkPermissions() {
  16. return true;
  17. }
  18. /**
  19. * Register custom CSS/JS for the page
  20. * @return void
  21. */
  22. public function loadCustomCssJs() {}
  23. /**
  24. * Custom logic code here for setting placeholders, etc
  25. * @param array $scriptProperties
  26. * @return mixed
  27. */
  28. public function process(array $scriptProperties = array()) {
  29. $this->modx->runProcessor('security/logout');
  30. $url = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
  31. $this->modx->sendRedirect($url);
  32. }
  33. /**
  34. * Return the pagetitle
  35. *
  36. * @return string
  37. */
  38. public function getPageTitle() {
  39. return $this->modx->lexicon('logout');
  40. }
  41. /**
  42. * Return the location of the template file
  43. * @return string
  44. */
  45. public function getTemplateFile() {
  46. return 'security/logout.tpl';
  47. }
  48. /**
  49. * Specify the language topics to load
  50. * @return array
  51. */
  52. public function getLanguageTopics() {
  53. return array('access','user');
  54. }
  55. }