namespace.class.php 1.9 KB

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