Log in
Factory

ActionFactory

Magento\Rule\Model\ActionFactory

What it does

This factory class creates instances of rule action objects in Magento 2's rule engine.

Developers use this when building conditional business logic like shopping cart price rules, catalog price rules, or custom rules that need to execute specific actions based on conditions.

It provides a centralized way to instantiate different action types by passing the action class name and optional configuration data.

Public Methods

  • create()