index.class.php 2.2 KB

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