Website
Magento\Store\Model\Website
What it does
The Website model represents a Magento 2 website entity, which is the top level of the store hierarchy (Website > Store Group > Store View).
Developers use this class to manage website-level operations like retrieving groups and stores, accessing website-specific configuration, managing default groups/stores, and handling website currency settings.
It's commonly used when building multi-website Magento installations or when you need to work with website-scoped data.
Public Methods
- load()
- getConfig()
- setGroups()
- getGroupCollection()
- getGroups()
- getGroupIds()
- getGroupsCount()
- getDefaultGroup()
- setStores()
- getStoreCollection()
- getStores()
- getStoreIds()
- getStoreCodes()
- getStoresCount()
- isCanDelete()
- getWebsiteGroupStore()
- getDefaultGroupId()
- setDefaultGroupId()
- getCode()
- setCode()
- getName()
- setName()
- beforeDelete()
- afterDelete()
- afterSave()
- getBaseCurrencyCode()
- getBaseCurrency()
- getDefaultStore()
- getDefaultStoresSelect()
- isReadOnly()
- getIdentities()
- getCacheTags()
- getScopeType()
- getScopeTypeName()
- getExtensionAttributes()
- setExtensionAttributes()