You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating block with fields like checkboxes, radio or combo, options need to be passed to the command. However, as the field info is separated by comma(,) thus the options get separated in-appropriately, thus broken code is generated.
Details to include:
The extraction of input parameters is done in ArrayInputTrait inside explodeInlineArray() method.
How to reproduce
Run following command and observe the form definition in the generated code.
Pipe separated options should be allowed. In block.html.twig template, options are rendered as it is, however they should be processed and an array should be generated.
The text was updated successfully, but these errors were encountered:
Problem/Motivation
When generating block with fields like checkboxes, radio or combo, options need to be passed to the command. However, as the field info is separated by comma(,) thus the options get separated in-appropriately, thus broken code is generated.
Details to include:
How to reproduce
Run following command and observe the form definition in the generated code.
drupal --no-interaction generate:plugin:block --module=TestModule --class=HeadingBlock --label=headingblock --plugin-id=headingblock --inputs='"name":"gender","type":"radio","label":"Gender","options":"array("male" => "Male", "female" => "Female")"'
Solution
Pipe separated options should be allowed. In block.html.twig template, options are rendered as it is, however they should be processed and an array should be generated.
The text was updated successfully, but these errors were encountered: