silverstripe-subsites/code/SubsiteAdmin.php

30 lines
670 B
PHP
Raw Normal View History

2007-08-18 13:38:11 +02:00
<?php
/**
* Admin interface to manage and create {@link Subsite} instances.
*
* @package subsites
*/
class SubsiteAdmin extends ModelAdmin {
2007-08-18 13:38:11 +02:00
static $managed_models = array('Subsite');
static $url_segment = 'subsites';
static $menu_title = "Subsites";
2012-07-10 15:43:53 +02:00
public $showImportForm=false;
static $tree_class = 'Subsite';
public function getEditForm($id = null, $fields = null) {
$form = parent::getEditForm($id, $fields);
$grid=$form->Fields()->dataFieldByName('Subsite');
if($grid) {
$grid->getConfig()->removeComponentsByType('GridFieldDetailForm');
$grid->getConfig()->addComponent(new GridFieldSubsiteDetailForm());
2012-07-10 15:43:53 +02:00
}
return $form;
2007-08-18 13:38:11 +02:00
}
}