Log in
Interface

ItemInterface

Magento\Search\Model\Autocomplete\ItemInterface

What it does

This interface defines the contract for autocomplete suggestion items in Magento 2's search functionality.

Developers implement this interface when creating custom autocomplete data sources or suggestion types that appear in the search dropdown.

It ensures each autocomplete item can provide a title and be converted to an array format for frontend rendering.

Public Methods

  • getTitle()
  • toArray()