Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * TreeMenuAdmin is the modified ModelAdmin used for administrating tree menus (TreeMenu)
- *
- * @package treemenu
- * @version $Id: TreeMenuAdmin.php 3771 2010-09-30 18:53:20Z stig.lindqvist $ //svn:keywords Id property must be set on the file
- */
- class TreeMenuAdmin extends ModelAdmin {
- /**
- * @var string
- */
- public static $url_segment = 'treemenus';
- /**
- * @var string
- */
- private static $url_rule = '$Action/$ID';
- /**
- * @var string
- */
- public static $menu_title = 'Tree Menus';
- /**
- * @var string
- */
- public static $menu_priority = 1;
- /**
- * Pretty much hardcoded to only work with TreeMenu, but required for
- * the inherited ModelAdmin to work correctly
- *
- * @var array
- */
- public static $managed_models = array(
- 'TreeMenu'
- );
- /**
- * Init function, loads javascript etc
- *
- * @return void
- */
- public function init() {
- parent::init();
- /**
- * Returns the list of existing Menus for the Ajax part of the admin
- *
- * @param HTTPRequest $request - where and Locale can be speciefied
- * @return string - html for the list / form
- */
- protected function AjaxGetTreeMenuList( HTTPRequest $request ) {
- $form = $this->ResultsForm( 'TreeMenu', $request );
- return $form->formHtmlContent();
- }
- }
- class TreeMenuAdmin_Controller extends controller{
- private static $allowed_actions = array(
- 'get'
- );
- public function get( HTTPRequest $request ){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement