From 0b7a63e0482a8e004ef34595233654124189fcbe Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 7 Dec 2021 13:01:57 +1300 Subject: [PATCH] ENH: Use sanitiseClassName for consistency. --- src/Admin/SubsiteAdmin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Admin/SubsiteAdmin.php b/src/Admin/SubsiteAdmin.php index 6c1c4c8f..4e345c4e 100644 --- a/src/Admin/SubsiteAdmin.php +++ b/src/Admin/SubsiteAdmin.php @@ -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);