action.class.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 System Actions page
  12. *
  13. * @package modx
  14. * @subpackage manager.controllers
  15. */
  16. class SystemActionManagerController 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('actions');
  23. }
  24. /**
  25. * Register custom CSS/JS for the page
  26. * @return void
  27. */
  28. public function loadCustomCssJs() {
  29. $mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
  30. $this->addJavascript($mgrUrl.'assets/modext/widgets/system/modx.tree.menu.js');
  31. $this->addJavascript($mgrUrl.'assets/modext/widgets/system/modx.panel.actions.js');
  32. $this->addJavascript($mgrUrl.'assets/modext/sections/system/action.js');
  33. $this->addHtml("<script>
  34. Ext.onReady(function() {
  35. MODx.add('modx-page-actions');
  36. });</script>");
  37. }
  38. /**
  39. * Custom logic code here for setting placeholders, etc
  40. * @param array $scriptProperties
  41. * @return mixed
  42. */
  43. public function process(array $scriptProperties = array()) {}
  44. /**
  45. * Return the pagetitle
  46. *
  47. * @return string
  48. */
  49. public function getPageTitle() {
  50. return $this->modx->lexicon('topmenu');
  51. }
  52. /**
  53. * Return the location of the template file
  54. * @return string
  55. */
  56. public function getTemplateFile() {
  57. return '';
  58. }
  59. /**
  60. * Specify the language topics to load
  61. * @return array
  62. */
  63. public function getLanguageTopics() {
  64. return array('topmenu','menu','namespace');
  65. }
  66. public function getHelpUrl() {
  67. return 'Actions+and+Menus';
  68. }
  69. }