From be93a2cee58d5da1d59c50fc9dd9e2795ace804f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 17 Oct 2024 13:25:32 +1300 Subject: [PATCH] ENH Update code to reflect changes to LeftAndMain --- src/Extension/FluentCMSMainExtension.php | 2 +- src/Extension/FluentLeftAndMainExtension.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extension/FluentCMSMainExtension.php b/src/Extension/FluentCMSMainExtension.php index 318f13c2..71832e7a 100644 --- a/src/Extension/FluentCMSMainExtension.php +++ b/src/Extension/FluentCMSMainExtension.php @@ -106,7 +106,7 @@ public function publish_localised_copy($data, $form) protected function getRecordForLocalisedAction($data, $form): ?DataObject { $id = (int) $data['ID']; - $className = $this->owner->config()->get('model_class'); + $className = $this->owner->getModelClass(); if (!$id || !$className) { // Invalid inputs diff --git a/src/Extension/FluentLeftAndMainExtension.php b/src/Extension/FluentLeftAndMainExtension.php index c0320cee..cb81cf8d 100644 --- a/src/Extension/FluentLeftAndMainExtension.php +++ b/src/Extension/FluentLeftAndMainExtension.php @@ -33,7 +33,7 @@ protected function onInit() */ protected function updateBreadcrumbs(ArrayList $breadcrumbs) { - $record = $this->owner->currentPage(); + $record = $this->owner->currentRecord(); if (!$record) { return; }