Log in
Factory

RegionFactory

Magento\Directory\Model\RegionFactory

What it does

This factory class creates new instances of the Region model, which represents geographical regions/states within countries in Magento.

Developers use this factory when they need to instantiate Region objects programmatically, such as when loading or creating region data for address forms, customer addresses, or administrative areas.

The factory pattern ensures proper dependency injection and allows passing custom arguments during object creation.

Public Methods

  • create()