index.class.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * Loads the Import Resources page
  4. *
  5. * @package modx
  6. * @subpackage manager.controllers
  7. */
  8. class SystemImportManagerController 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('import_static');
  15. }
  16. /**
  17. * Register custom CSS/JS for the page
  18. * @return void
  19. */
  20. public function loadCustomCssJs() {
  21. $mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
  22. $this->addJavascript($mgrUrl.'assets/modext/widgets/resource/modx.tree.resource.simple.js');
  23. $this->addJavascript($mgrUrl.'assets/modext/widgets/system/modx.panel.import.resources.js');
  24. $this->addJavascript($mgrUrl.'assets/modext/sections/system/import/resource.js');
  25. $this->addHtml("<script>
  26. Ext.onReady(function() {
  27. MODx.add('modx-page-import-resource');
  28. });</script>");
  29. }
  30. /**
  31. * Custom logic code here for setting placeholders, etc
  32. * @param array $scriptProperties
  33. * @return mixed
  34. */
  35. public function process(array $scriptProperties = array()) {}
  36. /**
  37. * Return the pagetitle
  38. *
  39. * @return string
  40. */
  41. public function getPageTitle() {
  42. return $this->modx->lexicon('import_site');
  43. }
  44. /**
  45. * Return the location of the template file
  46. * @return string
  47. */
  48. public function getTemplateFile() {
  49. return '';
  50. }
  51. /**
  52. * Specify the language topics to load
  53. * @return array
  54. */
  55. public function getLanguageTopics() {
  56. return array('import');
  57. }
  58. }