Skip to content

Code Generation

Kristofers Ozoliņš edited this page Apr 4, 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

Data patch generation

Ctrl-Shift-P -> Magento Toolbox: Generate data patch

image

ViewModel generation

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

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

Clone this wiki locally