Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <?php
  2. /**
  3. * TreeMenuAdmin is the modified ModelAdmin used for administrating tree menus (TreeMenu)
  4. *
  5. * @package treemenu
  6. * @version $Id: TreeMenuAdmin.php 3771 2010-09-30 18:53:20Z stig.lindqvist $ //svn:keywords Id property must be set on the file
  7. */
  8. class TreeMenuAdmin extends ModelAdmin {
  9.  
  10. /**
  11. * @var string
  12. */
  13. public static $url_segment = 'treemenus';
  14.  
  15. /**
  16. * @var string
  17. */
  18. private static $url_rule = '$Action/$ID';
  19.  
  20. /**
  21. * @var string
  22. */
  23. public static $menu_title = 'Tree Menus';
  24.  
  25.  
  26.  
  27. /**
  28. * @var string
  29. */
  30. public static $menu_priority = 1;
  31.  
  32. /**
  33. * Pretty much hardcoded to only work with TreeMenu, but required for
  34. * the inherited ModelAdmin to work correctly
  35. *
  36. * @var array
  37. */
  38. public static $managed_models = array(
  39. 'TreeMenu'
  40. );
  41.  
  42. /**
  43. * Init function, loads javascript etc
  44. *
  45. * @return void
  46. */
  47. public function init() {
  48. parent::init();
  49.  
  50.  
  51. /**
  52. * Returns the list of existing Menus for the Ajax part of the admin
  53. *
  54. * @param HTTPRequest $request - where and Locale can be speciefied
  55. * @return string - html for the list / form
  56. */
  57. protected function AjaxGetTreeMenuList( HTTPRequest $request ) {
  58. $form = $this->ResultsForm( 'TreeMenu', $request );
  59. return $form->formHtmlContent();
  60. }
  61.  
  62.  
  63.  
  64. }
  65.  
  66. class TreeMenuAdmin_Controller extends controller{
  67.  
  68. private static $allowed_actions = array(
  69. 'get'
  70. );
  71.  
  72.  
  73.  
  74. public function get( HTTPRequest $request ){
  75.  
  76. }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement