Log in
Model

ListMode

Magento\Catalog\Model\Config\Source\ListMode

What it does

This class provides configuration options for product listing display modes in Magento 2 catalog pages.

Developers use this as a source model in system configuration to allow store administrators to choose how products are displayed - as a grid, list, or both with a default preference.

It's commonly used in backend configuration fields where store owners need to select the product listing layout for category pages.

Public Methods

  • toOptionArray()