Log in
Model

Category

Magento\Catalog\Model\Config\Source\Category

What it does

This class provides a source model for populating dropdown/select fields with root-level categories in the Magento admin configuration.

Developers use this class when creating system configuration fields or form elements that need to display a list of available categories for selection, such as configuring which category to use as a navigation menu root or default landing page.

Public Methods

  • toOptionArray()