silverstripe-subsites/code/SubsiteAdmin.php

34 lines
846 B
PHP
Raw Permalink Normal View History

2007-08-18 13:38:11 +02:00
<?php
/**
* Admin interface to manage and create {@link Subsite} instances.
*
* @package subsites
*/
2015-11-23 04:53:45 +01:00
class SubsiteAdmin extends ModelAdmin
{
private static $managed_models = array('Subsite');
2015-11-23 04:53:45 +01:00
private static $url_segment = 'subsites';
private static $menu_title = "Subsites";
2013-05-24 06:39:25 +02:00
2015-11-23 04:53:45 +01:00
private static $menu_icon = "subsites/images/subsites.png";
public $showImportForm=false;
2015-11-23 04:53:45 +01:00
private static $tree_class = 'Subsite';
2015-11-23 04:53:45 +01:00
public function getEditForm($id = null, $fields = null)
{
$form = parent::getEditForm($id, $fields);
2015-11-23 04:53:45 +01:00
$grid=$form->Fields()->dataFieldByName('Subsite');
if ($grid) {
$grid->getConfig()->removeComponentsByType('GridFieldDetailForm');
$grid->getConfig()->addComponent(new GridFieldSubsiteDetailForm());
}
2015-11-23 04:53:45 +01:00
return $form;
}
2007-08-18 13:38:11 +02:00
}