Log in
Model

Website

Magento\Config\Model\Config\Source\Website

What it does

This class provides a source model for populating dropdown/select fields in Magento 2 admin configuration with available websites.

Developers use this class when creating system configuration fields that need to display a list of websites for selection, excluding the default admin website (ID 0).

It's commonly referenced in system.xml files via the source_model attribute.

Public Methods

  • toOptionArray()