Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

861: Developed context actions group, added generate routes.xml context action #958

Conversation

bohdan-harniuk
Copy link
Collaborator

Description (*)

Developed abstraction for quick adding new context dependent file generation actions.
To add new file generation action that depends on context:

  1. create an action class that extends com.magento.idea.magento2plugin.actions.context.AbstractContextAction
  2. register it in the plugin.xml file inside the MagentoContextBasedActionsGroup group
  3. implement the isVisible method to define condition where to show this action
  4. implement the getProperties method to specify properties that should be auto-populated from the known context (leave empty for user-defined values)

Added new routes.xml generation action.

Conditions to show this action:

  1. an etc/adminhtml/frontend folder inside the Magento 2 module

Auto-populated variables from the context:

  1. MODULE_NAME
  2. ROUTER_ID

Screenshot 2022-02-05 at 16 06 56

Screenshot 2022-02-05 at 16 07 41

Screenshot 2022-02-05 at 16 07 56

Screenshot 2022-02-05 at 16 08 16

Fixed Issues (if relevant)

  1. Fixes A lot of file templates are missing on new menu #861

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Copy link
Collaborator

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bohdan-harniuk
Thank you for your contribution.
Please check my comment.
Thank you in advance

<td width="100%" valign="top"><font face="verdana" size="-1">Specifies the name of your module
</font>
</td>
</tr>
</table>
</body>
</html>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add new line at end of file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bohdan-harniuk
Copy link
Collaborator Author

Hello, @andrewbess!

Thank you for your review!
I've fixed what you mentioned in the review.

Regards,

Copy link
Collaborator

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bohdan-harniuk
Thank you for the fast fix
Approved ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A lot of file templates are missing on new menu
4 participants