Log in
Factory

CommandFactory

Magento\Backend\Model\Menu\Builder\CommandFactory

What it does

This factory class creates command objects used to build the backend admin menu in Magento 2.

Developers use this when extending or modifying the admin menu structure, as it dynamically instantiates specific command classes (like Add, Remove, Update) based on the command name passed to the create method.

Public Methods

  • create()