From 66027c76063a4f7f730777450cbca9b9ac4be616 Mon Sep 17 00:00:00 2001 From: Carl Parent Date: Wed, 10 Jul 2024 02:54:17 -0400 Subject: [PATCH] Fix null returned instead of object when getting task_details form metadata (#74) --- Metadata/FormMetadataLoader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Metadata/FormMetadataLoader.php b/Metadata/FormMetadataLoader.php index 31fc455..1e63c72 100644 --- a/Metadata/FormMetadataLoader.php +++ b/Metadata/FormMetadataLoader.php @@ -16,6 +16,7 @@ use Sulu\Bundle\AdminBundle\Metadata\FormMetadata\FormMetadataLoaderInterface; use Sulu\Bundle\AdminBundle\Metadata\FormMetadata\OptionMetadata; use Sulu\Bundle\AdminBundle\Metadata\MetadataInterface; +use Sulu\Bundle\AdminBundle\Metadata\SchemaMetadata\SchemaMetadata; use Sulu\Bundle\AutomationBundle\TaskHandler\AutomationTaskHandlerInterface; use Symfony\Contracts\Translation\TranslatorInterface; use Task\TaskBundle\Handler\TaskHandlerFactory; @@ -58,6 +59,9 @@ public function getMetadata(string $key, string $locale, array $metadataOptions) $form = new FormMetadata(); $form->setKey(self::TASK_DETAILS_VIEW); + $schemaMetadata = new SchemaMetadata(); + $form->setSchema($schemaMetadata); + // Single Select $singleSelectHandler = new FieldMetadata('handlerClass'); $singleSelectHandler->setType('single_select');