Skip to content

Code Generation

Kristofers Ozoliņš edited this page Feb 27, 2025 · 3 revisions

Module generation

Ctrl-Shift-P -> Magento Toolbox: Generate Module

image

Block generation

Ctrl-Shift-P -> Magento Toolbox: Generate Block

image

Plugin generation

At the moment, plugin generation is only available via the context menu. Right-click a method or anywhere in a PHP class

image image

Observer generation

Ctrl-Shift-P -> Magento Toolbox: Generate Observer

image

Preference generation

Ctrl-Shift-P -> Magento Toolbox: Generate Preference This command is also available in the right-click context menu when you click anywhere in a PHP class or interface.

image image

Sample XML file generation

Generate sample XML configuration files in the etc directory. All of these commands are also available in the File Explorer context menu

image

Generate events.xml:

Ctrl-Shift-P -> Magento Toolbox: Generate Events XML

Generate schema.graphqls:

Ctrl-Shift-P -> Magento Toolbox: Generate GraphQL Schema File

Generate routes.xml:

Ctrl-Shift-P -> Magento Toolbox: Generate Routes XML

Generate acl.xml:

Ctrl-Shift-P -> Magento Toolbox: Generate ACL XML

Generate di.xml:

Ctrl-Shift-P -> Magento Toolbox: Generate DI XML

Generate webapi.xml:

Ctrl-Shift-P -> Magento Toolbox: Generate Webapi XML

Clone this wiki locally