Closed
Description
Describe the bug
Currently, we can't use an underscore _
in the argument name, only letters and numbers. The underscore character is not prohibited for use in layouts by Magento, so it must be allowed for use in the dialog window.
To Reproduce
- Open any layout file
- Right click on the block
- Select the Inject a ViewModel... option
- Fill in all the input data and use the view_model value for the Argument Name field
- Click Ok button
Expected behavior
The View Model is added to the block with the specified name containing the underscore character.
Screenshots
Please complete the following information:
- OS: MacOS 10.15.7
- PhpStorm/Intellij version: 2020.2.3
- Plugin Version: 2.0.1
Additional context
Here are examples from the Magneto code where underscores are used: