Log in
Model

ToModel

Magento\SalesRule\Model\Converter\ToModel

What it does

This converter class transforms SalesRule data models (API/interface representations) into Rule model objects used internally by Magento.

Developers use this when working with the SalesRule API to convert incoming rule data into the format required by Magento's rule processing engine, including mapping conditions, action conditions, store labels, and coupon types.

Public Methods

  • dataModelToArray()
  • toModel()