view.class.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * Loads the workspace package builder
  4. *
  5. * @package modx
  6. * @subpackage manager.controllers
  7. */
  8. class WorkspacesPackageViewManagerController 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('workspaces');
  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/workspace/combos.js');
  23. $this->addJavascript($mgrUrl.'assets/modext/workspace/package/package.versions.grid.js');
  24. $this->addJavascript($mgrUrl.'assets/modext/workspace/package/package.panel.js');
  25. $this->addJavascript($mgrUrl.'assets/modext/workspace/package/index.js');
  26. $this->addHtml("<script>
  27. Ext.onReady(function() {
  28. //MODx.load({ xtype: 'modx-page-package' });
  29. MODx.add('modx-page-package');
  30. });</script>");
  31. }
  32. /**
  33. * Custom logic code here for setting placeholders, etc
  34. * @param array $scriptProperties
  35. * @return mixed
  36. */
  37. public function process(array $scriptProperties = array()) {}
  38. /**
  39. * Return the pagetitle
  40. *
  41. * @return string
  42. */
  43. public function getPageTitle() {
  44. return $this->modx->lexicon('package_view');
  45. }
  46. /**
  47. * Return the location of the template file
  48. * @return string
  49. */
  50. public function getTemplateFile() {
  51. return;
  52. }
  53. /**
  54. * Specify the language topics to load
  55. * @return array
  56. */
  57. public function getLanguageTopics() {
  58. return array('workspace','namespace');
  59. }
  60. /**
  61. * Get the Help URL
  62. * @return string
  63. */
  64. public function getHelpUrl() {
  65. return 'Package+Management';
  66. }
  67. }