From 863321aed3efd6ffff916c5934b3da055eb04e18 Mon Sep 17 00:00:00 2001 From: Mojmir Fendek Date: Fri, 5 Apr 2024 12:47:20 +1300 Subject: [PATCH] Fixes. --- src/Extension/Traits/FluentObjectTrait.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Extension/Traits/FluentObjectTrait.php b/src/Extension/Traits/FluentObjectTrait.php index 7efdec4e..26e987fb 100644 --- a/src/Extension/Traits/FluentObjectTrait.php +++ b/src/Extension/Traits/FluentObjectTrait.php @@ -94,7 +94,9 @@ public function augmentDataQueryCreation( */ protected function updateFluentCMSFields(FieldList $fields) { - if (!$this->owner->ID) { + $owner = $this->owner; + + if (!$owner->ID) { return; } @@ -150,11 +152,11 @@ protected function updateFluentCMSFields(FieldList $fields) } // Let extensions override columns - $this->owner->extend('updateLocalisationTabColumns', $summaryColumns); + $owner->extend('updateLocalisationTabColumns', $summaryColumns); $columns->setDisplayFields($summaryColumns); // Let extensions override components - $this->owner->extend('updateLocalisationTabConfig', $config); + $owner->extend('updateLocalisationTabConfig', $config); // Add gridfield to tab / fields $gridField = GridField::create(