index.class.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * Loads the manager logs page
  4. *
  5. * @package modx
  6. * @subpackage manager.controllers
  7. */
  8. class SystemLogsManagerController extends modManagerController {
  9. /**
  10. * Check for any permissions or requirements to load page
  11. * @return bool
  12. */
  13. public function checkPermissions() {
  14. return $this->modx->hasPermission('logs');
  15. }
  16. /**
  17. * Register custom CSS/JS for the page
  18. * @return void
  19. */
  20. public function loadCustomCssJs() {
  21. $this->addJavascript($this->modx->getOption('manager_url').'assets/modext/widgets/system/modx.grid.manager.log.js');
  22. $this->addJavascript($this->modx->getOption('manager_url').'assets/modext/sections/system/logs.js');
  23. $this->addHtml("<script>
  24. Ext.onReady(function() {
  25. MODx.add('modx-page-manager-log');
  26. });</script>");
  27. }
  28. /**
  29. * Custom logic code here for setting placeholders, etc
  30. * @param array $scriptProperties
  31. * @return mixed
  32. */
  33. public function process(array $scriptProperties = array()) {}
  34. /**
  35. * Return the pagetitle
  36. *
  37. * @return string
  38. */
  39. public function getPageTitle() {
  40. return $this->modx->lexicon('manager_log');
  41. }
  42. /**
  43. * Return the location of the template file
  44. * @return string
  45. */
  46. public function getTemplateFile() {
  47. return '';
  48. }
  49. /**
  50. * Specify the language topics to load
  51. * @return array
  52. */
  53. public function getLanguageTopics() {
  54. return array('manager_log');
  55. }
  56. }