silverstripe-subsites/code/SubsiteAdmin.php

33 lines
765 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
private static $managed_models = array('Subsite');
private static $url_segment = 'subsites';
private static $menu_title = "Subsites";
2013-05-24 06:39:25 +02:00
private static $menu_icon = "subsites/images/subsites.png";
2012-07-10 15:43:53 +02:00
public $showImportForm=false;
private 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
}
}