From dc778de2475db0526435c6f6f6e28c6fb925ddac Mon Sep 17 00:00:00 2001 From: Christoph Maurer Date: Thu, 12 Dec 2024 16:16:58 +0100 Subject: [PATCH] Load Objectbrick class with first letter always uppercase --- src/DataDefinitionsBundle/Setter/ObjectbrickSetter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataDefinitionsBundle/Setter/ObjectbrickSetter.php b/src/DataDefinitionsBundle/Setter/ObjectbrickSetter.php index 1808f8ef..da5d4bc3 100644 --- a/src/DataDefinitionsBundle/Setter/ObjectbrickSetter.php +++ b/src/DataDefinitionsBundle/Setter/ObjectbrickSetter.php @@ -50,7 +50,7 @@ public function set(SetterContextInterface $context) $brickFieldObject = $brick->$brickClassGetter(); if (!$brickFieldObject instanceof AbstractData) { - $brickFieldObjectClass = 'Pimcore\Model\DataObject\Objectbrick\Data\\' . $class; + $brickFieldObjectClass = 'Pimcore\Model\DataObject\Objectbrick\Data\\' . ucfirst($class); $brickFieldObject = new $brickFieldObjectClass($context->getObject()); @@ -90,7 +90,7 @@ public function get(GetterContextInterface $context) $brickFieldObject = $brick->$brickClassGetter(); if (!$brickFieldObject instanceof AbstractData) { - $brickFieldObjectClass = 'Pimcore\Model\DataObject\Objectbrick\Data\\' . $class; + $brickFieldObjectClass = 'Pimcore\Model\DataObject\Objectbrick\Data\\' . ucfirst($class); $brickFieldObject = new $brickFieldObjectClass($context->getObject());