Skip to content

Commit

Permalink
ENH: Use sanitiseClassName for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Dec 7, 2021
1 parent f52b857 commit 0b7a63e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Admin/SubsiteAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getEditForm($id = null, $fields = null)
$form = parent::getEditForm($id, $fields);

if ($this->modelClass === Subsite::class) {
$grid = $form->Fields()->dataFieldByName(str_replace('\\', '-', Subsite::class));
$grid = $form->Fields()->dataFieldByName($this->sanitiseClassName(Subsite::class));
if ($grid) {
$grid->getConfig()->getComponentByType(GridFieldPaginator::class)->setItemsPerPage(100);
$grid->getConfig()->removeComponentsByType(GridFieldDetailForm::class);
Expand Down

0 comments on commit 0b7a63e

Please sign in to comment.