From 56a38e901bc58e49a5837b79cb1e3099482775f6 Mon Sep 17 00:00:00 2001 From: sebprt Date: Fri, 28 Jul 2023 16:55:46 +0200 Subject: [PATCH] Added reason option into the configuration --- src/Plugin/Filtering/Configuration/Reject.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Plugin/Filtering/Configuration/Reject.php b/src/Plugin/Filtering/Configuration/Reject.php index 1a426ce2..5d085131 100644 --- a/src/Plugin/Filtering/Configuration/Reject.php +++ b/src/Plugin/Filtering/Configuration/Reject.php @@ -28,6 +28,14 @@ public function getConfigTreeBuilder(): TreeBuilder ->then(asExpression()) ->end() ->end() + ->scalarNode('reason') + ->isRequired() + ->cannotBeEmpty() + ->validate() + ->ifTrue(isExpression()) + ->then(asExpression()) + ->end() + ->end() ->end() ->end() ;