Log in
Interface

OptionInterface

Magento\PageBuilder\Model\Catalog\Sorting\OptionInterface

What it does

This interface defines the contract for sorting options used in PageBuilder product widgets.

Developers implement this interface to create custom sorting strategies for product collections, such as sorting by price, name, or custom attributes.

Each implementation must provide a sort method to apply the ordering logic and a label method to describe the sorting option in the UI.

Public Methods

  • sort()
  • getLabel()