diff --git a/src/CampaignAdmin.php b/src/CampaignAdmin.php index d182916..f82fc1b 100644 --- a/src/CampaignAdmin.php +++ b/src/CampaignAdmin.php @@ -144,7 +144,7 @@ public function getClientConfig() 'url' => $this->Link('removeCampaignItem/:id/:itemId'), 'method' => 'post' ], - 'treeClass' => $this->config()->get('tree_class') + 'treeClass' => $this->getModelClass() ]); } @@ -235,7 +235,7 @@ protected function getListResource() $items = $this->getListItems(); $count = $items->count(); /** @var string $treeClass */ - $treeClass = $this->config()->get('tree_class'); + $treeClass = $this->getModelClass(); $hal = [ 'count' => $count, 'total' => $count, diff --git a/src/CampaignAdminList.php b/src/CampaignAdminList.php index 3bc780a..9f1b4bf 100644 --- a/src/CampaignAdminList.php +++ b/src/CampaignAdminList.php @@ -32,7 +32,7 @@ public function getSchemaDataDefaults() // Get endpoints from admin $admin = CampaignAdmin::singleton(); - $data['data']['recordType'] = $admin->config()->uninherited('tree_class'); + $data['data']['recordType'] = $admin->getModelClass(); $oneSetAction = $admin->Link("set") . "/:id"; $setsAction = $admin->Link("sets"); $schemaEndpoint = $admin->Link("schema") . "/DetailEditForm";