create.class.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * @package modx
  4. * @subpackage manager.controllers
  5. */
  6. /**
  7. * Loads the dashboard create page
  8. *
  9. * @package modx
  10. * @subpackage manager.controllers
  11. */
  12. class SystemDashboardsCreateManagerController extends modManagerController {
  13. /**
  14. * Check for any permissions or requirements to load page
  15. * @return bool
  16. */
  17. public function checkPermissions() {
  18. return $this->modx->hasPermission('dashboards');
  19. }
  20. /**
  21. * Custom logic code here for setting placeholders, etc
  22. *
  23. * @param array $scriptProperties
  24. * @return array
  25. */
  26. public function process(array $scriptProperties = array()) {
  27. return array();
  28. }
  29. /**
  30. * Register custom CSS/JS for the page
  31. * @return void
  32. */
  33. public function loadCustomCssJs() {
  34. $this->addJavascript($this->modx->getOption('manager_url')."assets/modext/widgets/system/modx.panel.dashboard.js");
  35. $this->addJavascript($this->modx->getOption('manager_url').'assets/modext/sections/system/dashboards/create.js');
  36. $this->addHtml('<script type="text/javascript">Ext.onReady(function() {
  37. MODx.add("modx-page-dashboard-create");
  38. });</script>');
  39. }
  40. /**
  41. * Return the pagetitle
  42. *
  43. * @return string
  44. */
  45. public function getPageTitle() {
  46. return $this->modx->lexicon('dashboards');
  47. }
  48. /**
  49. * Return the location of the template file
  50. * @return string
  51. */
  52. public function getTemplateFile() {
  53. return '';
  54. }
  55. /**
  56. * Specify the language topics to load
  57. * @return array
  58. */
  59. public function getLanguageTopics() {
  60. return array('dashboards','user');
  61. }
  62. /**
  63. * Get the Help URL
  64. * @return string
  65. */
  66. public function getHelpUrl() {
  67. return 'Dashboards';
  68. }
  69. }