trash.class.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. * Class ResourceIndexManagerController
  12. */
  13. class ResourceTrashManagerController extends modManagerController
  14. {
  15. /**
  16. * Register custom CSS/JS for the page
  17. * @return void
  18. */
  19. public function loadCustomCssJs()
  20. {
  21. $mgrUrl = $this->modx->getOption('manager_url', null, MODX_MANAGER_URL);
  22. $this->addJavascript($mgrUrl . 'assets/modext/widgets/resource/modx.grid.trash.js');
  23. $this->addJavascript($mgrUrl . 'assets/modext/widgets/resource/modx.panel.trash.js');
  24. $this->addJavascript($mgrUrl . 'assets/modext/sections/resource/trash/index.js');
  25. $this->addHtml('<script type="text/javascript">Ext.onReady(function() { MODx.add("modx-page-trash"); });</script>');
  26. }
  27. /**
  28. * @return null|string
  29. */
  30. public function getPageTitle()
  31. {
  32. return $this->modx->lexicon('trash.page_title');
  33. }
  34. /**
  35. * Check for any permissions or requirements to load page
  36. * @return bool
  37. */
  38. public function checkPermissions()
  39. {
  40. return $this->modx->hasPermission('menu_trash');
  41. }
  42. /**
  43. * Specify the language topics to load
  44. * @return array
  45. */
  46. public function getLanguageTopics()
  47. {
  48. return array('trash', 'namespace');
  49. }
  50. /**
  51. * Process the controller, returning an array of placeholders to set.
  52. * @param array $scriptProperties A array of REQUEST parameters.
  53. * @return mixed Either an error or output string, or an array of placeholders to set.
  54. */
  55. public function process(array $scriptProperties = array())
  56. {
  57. return null;
  58. }
  59. /**
  60. * Return the relative path to the template file to load
  61. * @return string
  62. */
  63. public function getTemplateFile()
  64. {
  65. return '';
  66. }
  67. }