index.class.php 1.8 KB

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