Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Subsite::currentSubsiteID() is deprecated use  SubsiteState::singleton()->getSubsiteId()
  • Loading branch information
Greg808 authored Jul 4, 2019
1 parent c4adf55 commit d0054a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit d0054a1

Please sign in to comment.