action.class.php 1.7 KB

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