mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
commit
c4adf556cf
@ -139,8 +139,8 @@ To limit your admin gridfields to the current Subsite records, you can do someth
|
|||||||
$form = parent::getEditForm($id, $fields);
|
$form = parent::getEditForm($id, $fields);
|
||||||
|
|
||||||
$gridField = $form->Fields()->fieldByName($this->sanitiseClassName($this->modelClass));
|
$gridField = $form->Fields()->fieldByName($this->sanitiseClassName($this->modelClass));
|
||||||
if(class_exists('Subsite')){
|
if(class_exists(Subsite::class)){
|
||||||
$list = $gridField->getList()->filter(array('SubsiteID'=>Subsite::currentSubsiteID()));
|
$list = $gridField->getList()->filter(['SubsiteID'=>Subsite::currentSubsiteID()]);
|
||||||
$gridField->setList($list);
|
$gridField->setList($list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user