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