Log in
Collection

Website\Collection

Magento\Store\Model\ResourceModel\Website\Collection

What it does

This collection class retrieves and manages Website records from the database in Magento 2.

Developers use it to load website data, filter by website IDs or groups, convert websites to option arrays for dropdowns, and optionally include the default admin website.

It provides methods to join related store group and store information when a complete website hierarchy is needed.

Public Methods

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