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. * Loads the resource group page
  12. *
  13. * @package modx
  14. * @subpackage manager.controllers
  15. */
  16. class SecurityResourceGroupManagerController 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(array('resourcegroup_resource_list' => true,'resourcegroup_resource_edit' => true));
  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/resource/modx.tree.resource.simple.js');
  31. $this->addJavascript($mgrUrl.'assets/modext/widgets/security/modx.tree.resource.group.js');
  32. $this->addJavascript($mgrUrl.'assets/modext/widgets/security/modx.panel.resource.group.js');
  33. $this->addJavascript($mgrUrl.'assets/modext/sections/security/resourcegroup/list.js');
  34. $this->addHtml("<script>
  35. Ext.onReady(function() {
  36. MODx.add('modx-page-resource-groups');
  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('resource_groups');
  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('user','access');
  66. }
  67. /**
  68. * Get the Help URL
  69. * @return string
  70. */
  71. public function getHelpUrl() {
  72. return 'Resource+Groups';
  73. }
  74. }