Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, \Magento\Config\Model\ResourceModel\Config\Data $configDataResource, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Store\Model\ResourceModel\Store\CollectionFactory $storeListFactory, \Magento\Store\Model\GroupFactory $storeGroupFactory, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Directory\Model\CurrencyFactory $currencyFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[]) | |
load ($id, $field=null) | |
getConfig ($path) | |
setGroups ($groups) | |
getGroupCollection () | |
getGroups () | |
getGroupIds () | |
getGroupsCount () | |
getDefaultGroup () | |
setStores ($stores) | |
getStoreCollection () | |
getStores () | |
getStoreIds () | |
getStoreCodes () | |
getStoresCount () | |
isCanDelete () | |
getWebsiteGroupStore () | |
getDefaultGroupId () | |
setDefaultGroupId ($defaultGroupId) | |
getCode () | |
setCode ($code) | |
getName () | |
setName ($name) | |
beforeDelete () | |
afterDelete () | |
afterSave () | |
getBaseCurrencyCode () | |
getBaseCurrency () | |
getDefaultStore () | |
getDefaultStoresSelect ($withDefault=false) | |
isReadOnly ($value=null) | |
getIdentities () | |
getScopeType () | |
getScopeTypeName () | |
getExtensionAttributes () | |
setExtensionAttributes (\Magento\Store\Api\Data\WebsiteExtensionInterface $extensionAttributes) | |
![]() | |
__construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, ExtensionAttributesFactory $extensionFactory, AttributeValueFactory $customAttributeFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[]) | |
getCustomAttributes () | |
getCustomAttribute ($attributeCode) | |
setCustomAttributes (array $attributes) | |
setCustomAttribute ($attributeCode, $attributeValue) | |
setData ($key, $value=null) | |
unsetData ($key=null) | |
getData ($key='', $index=null) | |
setId ($value) | |
__sleep () | |
__wakeup () | |
![]() | |
__construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[]) | |
__sleep () | |
__wakeup () | |
setIdFieldName ($name) | |
getIdFieldName () | |
getId () | |
setId ($value) | |
isDeleted ($isDeleted=null) | |
hasDataChanges () | |
setData ($key, $value=null) | |
unsetData ($key=null) | |
setDataChanges ($value) | |
getOrigData ($key=null) | |
setOrigData ($key=null, $data=null) | |
dataHasChangedFor ($field) | |
getResourceName () | |
getResourceCollection () | |
getCollection () | |
load ($modelId, $field=null) | |
beforeLoad ($identifier, $field=null) | |
afterLoad () | |
isSaveAllowed () | |
setHasDataChanges ($flag) | |
save () | |
afterCommitCallback () | |
isObjectNew ($flag=null) | |
beforeSave () | |
validateBeforeSave () | |
getCacheTags () | |
cleanModelCache () | |
afterSave () | |
delete () | |
beforeDelete () | |
afterDelete () | |
afterDeleteCommit () | |
getResource () | |
getEntityId () | |
setEntityId ($entityId) | |
clearInstance () | |
getStoredData () | |
getEventPrefix () | |
![]() | |
__construct (array $data=[]) | |
addData (array $arr) | |
setData ($key, $value=null) | |
unsetData ($key=null) | |
getData ($key='', $index=null) | |
getDataByPath ($path) | |
getDataByKey ($key) | |
setDataUsingMethod ($key, $args=[]) | |
getDataUsingMethod ($key, $args=null) | |
hasData ($key='') | |
toArray (array $keys=[]) | |
convertToArray (array $keys=[]) | |
toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
toJson (array $keys=[]) | |
convertToJson (array $keys=[]) | |
toString ($format='') | |
__call ($method, $args) | |
isEmpty () | |
serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"') | |
debug ($data=null, &$objects=[]) | |
offsetSet ($offset, $value) | |
offsetExists ($offset) | |
offsetUnset ($offset) | |
offsetGet ($offset) | |
![]() | |
getId () | |
![]() | |
getId () | |
setId ($id) | |
setExtensionAttributes (\Magento\Store\Api\Data\WebsiteExtensionInterface $extensionAttributes) | |
Data Fields | |
const | ENTITY = 'store_website' |
const | CACHE_TAG = 'website' |
![]() | |
const | CUSTOM_ATTRIBUTES = 'custom_attributes' |
![]() | |
const | EXTENSION_ATTRIBUTES_KEY = 'extension_attributes' |
![]() | |
const | SCOPE_DEFAULT = 'default' |
![]() | |
const | ADMIN_CODE = 'admin' |
Protected Member Functions | |
_construct () | |
_loadGroups () | |
_loadStores () | |
![]() | |
filterCustomAttributes ($data) | |
initializeCustomAttributes () | |
convertCustomAttributeValues (array &$customAttributes) | |
getCustomAttributesCodes () | |
_setExtensionAttributes (\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes) | |
_getExtensionAttributes () | |
![]() | |
_construct () | |
_init ($resourceModel) | |
_setResourceModel ($resourceName, $collectionName=null) | |
_getResource () | |
_getEventData () | |
_beforeLoad ($modelId, $field=null) | |
_afterLoad () | |
_hasModelChanged () | |
_getValidatorBeforeSave () | |
_createValidatorBeforeSave () | |
_getValidationRulesBeforeSave () | |
_clearReferences () | |
_clearData () | |
![]() | |
_getData ($key) | |
_underscore ($name) | |
Additional Inherited Members | |
![]() | |
static | $_underscoreCache = [] |
Core Website model
@api @method string getGroupTitle() @method string getStoreTitle() @method int getStoreId() @method int getGroupId() @method int getWebsiteId() @method bool hasWebsiteId() @method int getSortOrder() @method \Magento\Store\Model\Website setSortOrder($value) @method int getIsDefault() @method \Magento\Store\Model\Website setIsDefault($value) @SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 26 of file Website.php.
__construct | ( | \Magento\Framework\Model\Context | $context, |
\Magento\Framework\Registry | $registry, | ||
\Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory, | ||
\Magento\Framework\Api\AttributeValueFactory | $customAttributeFactory, | ||
\Magento\Config\Model\ResourceModel\Config\Data | $configDataResource, | ||
\Magento\Framework\App\Config\ScopeConfigInterface | $coreConfig, | ||
\Magento\Store\Model\ResourceModel\Store\CollectionFactory | $storeListFactory, | ||
\Magento\Store\Model\GroupFactory | $storeGroupFactory, | ||
\Magento\Store\Model\WebsiteFactory | $websiteFactory, | ||
\Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
\Magento\Directory\Model\CurrencyFactory | $currencyFactory, | ||
\Magento\Framework\Model\ResourceModel\AbstractResource | $resource = null , |
||
\Magento\Framework\Data\Collection\AbstractDb | $resourceCollection = null , |
||
array | $data = [] |
||
) |
\Magento\Framework\Model\Context | $context | |
\Magento\Framework\Registry | $registry | |
\Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory | |
\Magento\Framework\Api\AttributeValueFactory | $customAttributeFactory | |
\Magento\Config\Model\ResourceModel\Config\Data | $configDataResource | |
\Magento\Framework\App\Config\ScopeConfigInterface | $coreConfig | |
\Magento\Store\Model\ResourceModel\Store\CollectionFactory | $storeListFactory | |
\Magento\Store\Model\GroupFactory | $storeGroupFactory | |
\Magento\Store\Model\WebsiteFactory | $websiteFactory | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Directory\Model\CurrencyFactory | $currencyFactory | |
\Magento\Framework\Model\ResourceModel\AbstractResource | $resource | |
\Magento\Framework\Data\Collection\AbstractDb | $resourceCollection | |
array | $data | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 179 of file Website.php.
|
protected |
|
protected |
|
protected |
Load store collection and set internal data
Definition at line 372 of file Website.php.
afterDelete | ( | ) |
Rewrite in order to clear configuration cache
Definition at line 566 of file Website.php.
afterSave | ( | ) |
Clear configuration cache after creation website
Definition at line 579 of file Website.php.
beforeDelete | ( | ) |
Definition at line 548 of file Website.php.
getBaseCurrency | ( | ) |
Retrieve website base currency
Definition at line 615 of file Website.php.
getBaseCurrencyCode | ( | ) |
Retrieve website base currency code
Definition at line 593 of file Website.php.
getCode | ( | ) |
getConfig | ( | $path | ) |
Get website config data
string | $path |
Definition at line 245 of file Website.php.
getDefaultGroup | ( | ) |
Retrieve default group model
Definition at line 356 of file Website.php.
getDefaultGroupId | ( | ) |
getDefaultStore | ( | ) |
getDefaultStoresSelect | ( | $withDefault = false | ) |
Retrieve default stores select object Select fields website_id, store_id
bool | $withDefault | include/exclude default admin website |
Definition at line 644 of file Website.php.
getExtensionAttributes | ( | ) |
{Retrieve existing extension attributes object or create a new one.
Implements WebsiteInterface.
Definition at line 694 of file Website.php.
getGroupCollection | ( | ) |
Retrieve new (not loaded) Group collection object with website filter
Definition at line 306 of file Website.php.
getGroupIds | ( | ) |
getGroups | ( | ) |
Retrieve website groups
Definition at line 317 of file Website.php.
getGroupsCount | ( | ) |
getIdentities | ( | ) |
Get identities
Implements IdentityInterface.
Definition at line 668 of file Website.php.
getName | ( | ) |
Get scope name
Implements ScopeInterface.
Definition at line 532 of file Website.php.
getScopeType | ( | ) |
{Get scope type
Implements ScopeInterface.
Definition at line 677 of file Website.php.
getScopeTypeName | ( | ) |
{Get scope type name
Implements ScopeInterface.
Definition at line 686 of file Website.php.
getStoreCodes | ( | ) |
getStoreCollection | ( | ) |
Retrieve new (not loaded) Store collection object with website filter
Definition at line 413 of file Website.php.
getStoreIds | ( | ) |
getStores | ( | ) |
getStoresCount | ( | ) |
getWebsiteGroupStore | ( | ) |
Retrieve unique website-group-store key for collection with groups and stores
Definition at line 492 of file Website.php.
isCanDelete | ( | ) |
isReadOnly | ( | $value = null | ) |
Get/Set isReadOnly flag
bool | $value |
Definition at line 655 of file Website.php.
load | ( | $id, | |
$field = null |
|||
) |
Custom load
int | string | $id | |
string | $field |
Definition at line 230 of file Website.php.
setCode | ( | $code | ) |
string | $code |
Implements WebsiteInterface.
Definition at line 524 of file Website.php.
setDefaultGroupId | ( | $defaultGroupId | ) |
int | $defaultGroupId |
Implements WebsiteInterface.
Definition at line 508 of file Website.php.
setExtensionAttributes | ( | \Magento\Store\Api\Data\WebsiteExtensionInterface | $extensionAttributes | ) |
{}
Definition at line 702 of file Website.php.
setGroups | ( | $groups | ) |
setName | ( | $name | ) |
Set website name
string | $name |
Implements WebsiteInterface.
Definition at line 540 of file Website.php.
setStores | ( | $stores | ) |
Set website stores
array | $stores |
Definition at line 393 of file Website.php.
|
protected |
Definition at line 38 of file Website.php.
|
protected |
Definition at line 55 of file Website.php.
|
protected |
Definition at line 135 of file Website.php.
|
protected |
Definition at line 160 of file Website.php.
|
protected |
Definition at line 111 of file Website.php.
|
protected |
Definition at line 118 of file Website.php.
|
protected |
Definition at line 48 of file Website.php.
|
protected |
Definition at line 43 of file Website.php.
|
protected |
Definition at line 69 of file Website.php.
|
protected |
Definition at line 62 of file Website.php.
|
protected |
Definition at line 76 of file Website.php.
|
protected |
Definition at line 125 of file Website.php.
|
protected |
Definition at line 97 of file Website.php.
|
protected |
Definition at line 145 of file Website.php.
|
protected |
Definition at line 90 of file Website.php.
|
protected |
Definition at line 155 of file Website.php.
|
protected |
Definition at line 83 of file Website.php.
|
protected |
Definition at line 104 of file Website.php.
|
protected |
Definition at line 150 of file Website.php.
|
protected |
Definition at line 140 of file Website.php.
const CACHE_TAG = 'website' |
Definition at line 33 of file Website.php.
const ENTITY = 'store_website' |
Definition at line 31 of file Website.php.