Log in
Model

WebsiteRepository

Magento\Store\Model\WebsiteRepository

What it does

WebsiteRepository manages the retrieval and caching of website entities in Magento 2.

Developers use this class to fetch website information by code or ID, get a list of all websites, or retrieve the default website.

It provides efficient website data access with built-in caching to avoid repeated database queries.

Public Methods

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