Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | KEY_ID = 'id' |
const | KEY_COUNTRY_ID = 'tax_country_id' |
const | KEY_REGION_ID = 'tax_region_id' |
const | KEY_REGION_NAME = 'region_name' |
const | KEY_POSTCODE = 'tax_postcode' |
const | KEY_ZIP_IS_RANGE = 'zip_is_range' |
const | KEY_ZIP_RANGE_FROM = 'zip_from' |
const | KEY_ZIP_RANGE_TO = 'zip_to' |
const | KEY_PERCENTAGE_RATE = 'rate' |
const | KEY_CODE = 'code' |
const | KEY_TITLES = 'titles' |
![]() | |
const | CUSTOM_ATTRIBUTES = 'custom_attributes' |
![]() | |
const | EXTENSION_ATTRIBUTES_KEY = 'extension_attributes' |
Protected Member Functions | |
_construct () | |
_isInRule () | |
![]() | |
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) | |
Protected Attributes | |
$_titles = null | |
$_titleModel = null | |
$_regionFactory | |
$_titleFactory | |
$directoryRegion | |
![]() | |
$extensionAttributesFactory | |
$extensionAttributes | |
$customAttributeFactory | |
$customAttributesCodes = null | |
$customAttributesChanged = false | |
![]() | |
$_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 = [] | |
![]() | |
$_data = [] | |
Additional Inherited Members | |
![]() | |
static | $_underscoreCache = [] |
@SuppressWarnings(PHPMD.CouplingBetweenObjects)
__construct | ( | \Magento\Framework\Model\Context | $context, |
\Magento\Framework\Registry | $registry, | ||
\Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory, | ||
AttributeValueFactory | $customAttributeFactory, | ||
\Magento\Directory\Model\RegionFactory | $regionFactory, | ||
\Magento\Tax\Model\Calculation\Rate\TitleFactory | $taxTitleFactory, | ||
Region | $directoryRegion, | ||
\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 | |
AttributeValueFactory | $customAttributeFactory | |
\Magento\Directory\Model\RegionFactory | $regionFactory | |
Rate\TitleFactory | $taxTitleFactory | |
Region | $directoryRegion | |
\Magento\Framework\Model\ResourceModel\AbstractResource | $resource | |
\Magento\Framework\Data\Collection\AbstractDb | $resourceCollection | |
array | $data | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 72 of file Rate.php.
|
protected |
|
protected |
afterDelete | ( | ) |
afterSave | ( | ) |
beforeDelete | ( | ) |
deleteAllRates | ( | ) |
getCode | ( | ) |
{Get tax rate code
Implements TaxRateInterface.
Definition at line 388 of file Rate.php.
getExtensionAttributes | ( | ) |
{Retrieve existing extension attributes object or create a new one.
Implements TaxRateInterface.
Definition at line 518 of file Rate.php.
getRate | ( | ) |
{Get tax rate in percentage
Implements TaxRateInterface.
Definition at line 380 of file Rate.php.
getRegionName | ( | ) |
{Get region name
Implements TaxRateInterface.
Definition at line 319 of file Rate.php.
getTaxCalculationRateId | ( | ) |
@codeCoverageIgnoreStart {}
Definition at line 332 of file Rate.php.
getTaxCountryId | ( | ) |
{Get country id
Implements TaxRateInterface.
Definition at line 340 of file Rate.php.
getTaxPostcode | ( | ) |
{Get postcode
Implements TaxRateInterface.
Definition at line 356 of file Rate.php.
getTaxRegionId | ( | ) |
{Get region id
Implements TaxRateInterface.
Definition at line 348 of file Rate.php.
getTitleModel | ( | ) |
getTitles | ( | ) |
{Get tax rate titles
Implements TaxRateInterface.
Definition at line 271 of file Rate.php.
getZipFrom | ( | ) |
{Get zip range from
Implements TaxRateInterface.
Definition at line 364 of file Rate.php.
getZipIsRange | ( | ) |
{Get zip is range
Implements TaxRateInterface.
Definition at line 396 of file Rate.php.
getZipTo | ( | ) |
{Get zip range to
Implements TaxRateInterface.
Definition at line 372 of file Rate.php.
loadByCode | ( | $code | ) |
Load rate model by code
string | $code |
Definition at line 300 of file Rate.php.
saveTitles | ( | $titles = null | ) |
setCode | ( | $code | ) |
Set tax rate code
string | $code |
Implements TaxRateInterface.
Definition at line 495 of file Rate.php.
setExtensionAttributes | ( | \Magento\Tax\Api\Data\TaxRateExtensionInterface | $extensionAttributes | ) |
{Set an extension attributes object.
\Magento\Tax\Api\Data\TaxRateExtensionInterface | $extensionAttributes |
\Magento\Tax\Api\Data\TaxRateExtensionInterface | $extensionAttributes |
Implements TaxRateInterface.
Definition at line 529 of file Rate.php.
setRate | ( | $rate | ) |
Set tax rate in percentage
float | $rate |
Implements TaxRateInterface.
Definition at line 484 of file Rate.php.
setRegionName | ( | $regionName | ) |
Set region name
string | $regionName |
Implements TaxRateInterface.
Definition at line 429 of file Rate.php.
setTaxCountryId | ( | $taxCountryId | ) |
Set country id
string | $taxCountryId |
Implements TaxRateInterface.
Definition at line 407 of file Rate.php.
setTaxPostcode | ( | $taxPostCode | ) |
Set postcode
string | $taxPostCode |
Implements TaxRateInterface.
Definition at line 440 of file Rate.php.
setTaxRegionId | ( | $taxRegionId | ) |
Set region id
int | $taxRegionId |
Implements TaxRateInterface.
Definition at line 418 of file Rate.php.
setTitles | ( | array | $titles = null | ) |
Set tax rate titles
Implements TaxRateInterface.
Definition at line 506 of file Rate.php.
setZipFrom | ( | $zipFrom | ) |
Set zip range from
int | $zipFrom |
Implements TaxRateInterface.
Definition at line 462 of file Rate.php.
setZipIsRange | ( | $zipIsRange | ) |
Set zip is range
int | $zipIsRange |
Implements TaxRateInterface.
Definition at line 451 of file Rate.php.
setZipTo | ( | $zipTo | ) |
Set zip range to
int | $zipTo |
Implements TaxRateInterface.
Definition at line 473 of file Rate.php.
const KEY_ID = 'id' |