site_schedule.class.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Loads the site schedule
  4. *
  5. * @package modx
  6. * @subpackage manager.controllers
  7. */
  8. class ResourceSiteScheduleManagerController 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('view_document');
  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.panel.resource.schedule.js');
  23. $this->addJavascript($mgrUrl.'assets/modext/sections/resource/schedule.js');
  24. $this->addHtml("<script>
  25. Ext.onReady(function() {
  26. MODx.add('modx-page-resource-schedule');
  27. });</script>");
  28. }
  29. /**
  30. * Custom logic code here for setting placeholders, etc
  31. * @param array $scriptProperties
  32. * @return mixed
  33. */
  34. public function process(array $scriptProperties = array()) {}
  35. /**
  36. * Return the pagetitle
  37. *
  38. * @return string
  39. */
  40. public function getPageTitle() {
  41. return $this->modx->lexicon('site_schedule');
  42. }
  43. /**
  44. * Return the location of the template file
  45. * @return string
  46. */
  47. public function getTemplateFile() {
  48. return '';
  49. }
  50. /**
  51. * Specify the language topics to load
  52. * @return array
  53. */
  54. public function getLanguageTopics() {
  55. return array('resource');
  56. }
  57. }