N°8772 - compilation of choices values

This commit is contained in:
Eric Espie
2025-12-15 17:15:07 +01:00
parent a77e54c8cb
commit 2530d59e08
7 changed files with 59 additions and 12 deletions

View File

@@ -15,6 +15,7 @@ use ParseError;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use ReflectionMethod;
use SetupUtils;
use Symfony\Component\ErrorHandler\Error\FatalError;
use Symfony\Component\HttpKernel\KernelInterface;
use const DEBUG_BACKTRACE_IGNORE_ARGS;

View File

@@ -116,6 +116,14 @@ PHP,
<node id="choice_property" xsi:type="Combodo-Property">
<label>UI:Choice</label>
<value-type xsi:type="Combodo-ValueTypeChoice">
<values>
<value id="value_a">
<label>Label A</label>
</value>
<value id="value_b">
<label>Label B</label>
</value>
</values>
</value-type>
</node>
<node id="class_property" xsi:type="Combodo-Property">
@@ -172,6 +180,10 @@ class FormFor__AllValueTypesTest extends Combodo\iTop\Forms\Block\Base\FormBlock
\$this->Add('choice_property', 'Combodo\iTop\Forms\Block\Base\ChoiceFormBlock', [
'label' => 'UI:Choice',
'choices' => [
\Dict::S('Label A') => 'value_a',
\Dict::S('Label B') => 'value_b',
],
]);
\$this->Add('class_property', 'Combodo\iTop\Forms\Block\Base\TextFormBlock', [