Log in
Repository

WebsiteRepositoryInterface

Magento\Store\Api\WebsiteRepositoryInterface

What it does

This interface defines the contract for retrieving and managing Website entities in Magento 2.

Developers use this repository to fetch websites by code or ID, get all websites, access the default website, or clear the website cache.

It's essential when working with multi-website setups or when you need to retrieve website configuration data programmatically.

Public Methods

  • get()
  • getById()
  • getList()
  • getDefault()
  • clean()