Log in
Collection

Website\Collection

Magento\Store\Model\ResourceModel\Website\Collection

What it does

This collection class retrieves and manages website data from the database in Magento 2.

Developers use it to fetch lists of websites, optionally including the admin/default website, and can join related store group and store data.

It provides convenient methods for filtering websites by ID or group, and formatting results for dropdowns and select options.

Public Methods

  • setLoadDefault()
  • getLoadDefault()
  • toOptionArray()
  • toOptionHash()
  • addIdFilter()
  • load()
  • joinGroupAndStore()
  • addFilterByGroupIds()