namespace.class.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * @package modx
  4. */
  5. /**
  6. * Loads Namespace management
  7. *
  8. * @package modx
  9. * @subpackage manager.controllers
  10. */
  11. class WorkspacesNamespaceManagerController 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('namespaces');
  18. }
  19. /**
  20. * Register custom CSS/JS for the page
  21. * @return void
  22. */
  23. public function loadCustomCssJs() {
  24. $this->addJavascript($this->modx->getOption('manager_url').'assets/modext/workspace/namespace/modx.namespace.panel.js');
  25. $this->addJavascript($this->modx->getOption('manager_url').'assets/modext/workspace/namespace/index.js');
  26. $this->addHtml("<script>
  27. Ext.onReady(function() {
  28. MODx.add('modx-page-namespaces');
  29. });</script>");
  30. }
  31. /**
  32. * Custom logic code here for setting placeholders, etc
  33. * @param array $scriptProperties
  34. * @return mixed
  35. */
  36. public function process(array $scriptProperties = array()) {}
  37. /**
  38. * Return the pagetitle
  39. *
  40. * @return string
  41. */
  42. public function getPageTitle() {
  43. return $this->modx->lexicon('namespaces');
  44. }
  45. /**
  46. * Return the location of the template file
  47. * @return string
  48. */
  49. public function getTemplateFile() {
  50. return '';
  51. }
  52. /**
  53. * Specify the language topics to load
  54. * @return array
  55. */
  56. public function getLanguageTopics() {
  57. return array('workspace','namespace');
  58. }
  59. /**
  60. * Get the Help URL
  61. * @return string
  62. */
  63. public function getHelpUrl() {
  64. return 'Namespaces';
  65. }
  66. }