index.class.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * Load property set management page
  4. *
  5. * @package modx
  6. * @subpackage manager.controllers
  7. */
  8. class ElementPropertySetManagerController 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('edit_propertyset');
  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/core/modx.grid.local.property.js');
  23. $this->addJavascript($mgrUrl.'assets/modext/widgets/element/modx.grid.element.properties.js');
  24. $this->addJavascript($mgrUrl.'assets/modext/widgets/element/modx.panel.property.set.js');
  25. $this->addJavascript($mgrUrl.'assets/modext/sections/element/propertyset/index.js');
  26. $this->addHtml("<script>
  27. Ext.onReady(function() {
  28. MODx.add('modx-page-property-sets');
  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('propertysets');
  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('element','category','propertyset');
  58. }
  59. /**
  60. * Get the Help URL
  61. * @return string
  62. */
  63. public function getHelpUrl() {
  64. return 'Properties+and+Property+Sets';
  65. }
  66. }