magento2-phpstorm-plugin icon indicating copy to clipboard operation
magento2-phpstorm-plugin copied to clipboard

[Complex-Generation] Override template in a module

Open bohdan-harniuk opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

We should add an ability to override *.phtml template in a module. Now we can only override it in a custom theme.

Describe the solution you'd like (*)

Add a new context action similar to Override this file in a project theme.

Acceptance Criteria:

  • a new action added
  • it is showed only for *.phtml templates that can be overridden in the module
  • target generator added or used an existed
  • test coverage added if new generator is created
  • new reference block record is injected into the target module (layout file created or updated if it already exists)
  • user can choose template overriding option: https://developer.adobe.com/commerce/frontend-core/guide/layouts/xml-manage/#set-the-template-used-by-a-bloc
  • user can optionally inject a new view model in the block (use existing functionality)

Additional context

Mainline branch: 4.5.0-develop

bohdan-harniuk avatar Sep 07 '22 17:09 bohdan-harniuk

Hi @bohdan-harniuk. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Sep 07 '22 17:09 m2-assistant[bot]

@magento I am working on this

SilinMykola avatar Sep 20 '22 09:09 SilinMykola