mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
Update README.md
Subsite::currentSubsiteID() is deprecated use SubsiteState::singleton()->getSubsiteId()
This commit is contained in:
parent
c4adf556cf
commit
d0054a1294
@ -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));
|
||||
if(class_exists(Subsite::class)){
|
||||
$list = $gridField->getList()->filter(['SubsiteID'=>Subsite::currentSubsiteID()]);
|
||||
$list = $gridField->getList()->filter(['SubsiteID'=>SubsiteState::singleton()->getSubsiteId()]);
|
||||
$gridField->setList($list);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user