|
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\Locale\ListsInterface $localeLists, \Magento\Directory\Model\Country\FormatFactory $formatFactory, \Magento\Directory\Model\ResourceModel\Region\CollectionFactory $regionCollectionFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[]) | |
| loadByCode ($code) | |
| getRegions () | |
| getLoadedRegionCollection () | |
| getRegionCollection () | |
| formatAddress (\Magento\Framework\DataObject $address, $html=false) | |
| getFormats () | |
| getFormat ($type) | |
| getName ($locale=null) | |
Public Member Functions inherited from AbstractModel | |
| __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 () | |
Public Member Functions inherited from DataObject | |
| __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) | |
Static Public Attributes | |
| static | $_format = [] |
Protected Member Functions | |
| _construct () | |
Protected Member Functions inherited from AbstractModel | |
| _construct () | |
| _init ($resourceModel) | |
| _setResourceModel ($resourceName, $collectionName=null) | |
| _getResource () | |
| _getEventData () | |
| _beforeLoad ($modelId, $field=null) | |
| _afterLoad () | |
| _hasModelChanged () | |
| _getValidatorBeforeSave () | |
| _createValidatorBeforeSave () | |
| _getValidationRulesBeforeSave () | |
| _clearReferences () | |
| _clearData () | |
Protected Member Functions inherited from DataObject | |
| _getData ($key) | |
| _underscore ($name) | |
Protected Attributes | |
| $_localeLists | |
| $_formatFactory | |
| $_regionCollectionFactory | |
Protected Attributes inherited from AbstractModel | |
| $_eventPrefix = 'core_abstract' | |
| $_eventObject = 'object' | |
| $_idFieldName = 'id' | |
| $_hasDataChanges = false | |
| $_origData | |
| $_isDeleted = false | |
| $_resource | |
| $_resourceCollection | |
| $_resourceName | |
| $_collectionName | |
| $_cacheTag = false | |
| $_dataSaveAllowed = true | |
| $_isObjectNew = null | |
| $_validatorBeforeSave = null | |
| $_eventManager | |
| $_cacheManager | |
| $_registry | |
| $_logger | |
| $_appState | |
| $_actionValidator | |
| $storedData = [] | |
Protected Attributes inherited from DataObject | |
| $_data = [] | |
Additional Inherited Members | |
Static Protected Attributes inherited from DataObject | |
| static | $_underscoreCache = [] |
Country model
@method string getCountryId() @method \Magento\Directory\Model\Country setCountryId(string $value)
@api
Definition at line 19 of file Country.php.
| __construct | ( | \Magento\Framework\Model\Context | $context, |
| \Magento\Framework\Registry | $registry, | ||
| \Magento\Framework\Locale\ListsInterface | $localeLists, | ||
| \Magento\Directory\Model\Country\FormatFactory | $formatFactory, | ||
| \Magento\Directory\Model\ResourceModel\Region\CollectionFactory | $regionCollectionFactory, | ||
| \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\Locale\ListsInterface | $localeLists | |
| Country\FormatFactory | $formatFactory | |
| \Magento\Directory\Model\ResourceModel\Region\CollectionFactory | $regionCollectionFactory | |
| \Magento\Framework\Model\ResourceModel\AbstractResource | $resource | |
| \Magento\Framework\Data\Collection\AbstractDb | $resourceCollection | |
| array | $data |
Definition at line 51 of file Country.php.
|
protected |
| formatAddress | ( | \Magento\Framework\DataObject | $address, |
$html = false |
|||
| ) |
| \Magento\Framework\DataObject | $address | |
| bool | $html |
Definition at line 122 of file Country.php.
| getFormat | ( | $type | ) |
Retrieve country format
| string | $type |
Definition at line 184 of file Country.php.
| getFormats | ( | ) |
Retrieve country formats
Definition at line 163 of file Country.php.
| getLoadedRegionCollection | ( | ) |
Definition at line 100 of file Country.php.
| getName | ( | $locale = null | ) |
Get country name
Definition at line 201 of file Country.php.
| getRegionCollection | ( | ) |
Definition at line 110 of file Country.php.
| getRegions | ( | ) |
Get regions
Definition at line 92 of file Country.php.
| loadByCode | ( | $code | ) |
|
static |
Definition at line 24 of file Country.php.
|
protected |
Definition at line 34 of file Country.php.
|
protected |
Definition at line 29 of file Country.php.
|
protected |
Definition at line 39 of file Country.php.