|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
| const | KEY_ID = 'class_id' |
| const | KEY_NAME = 'class_name' |
| const | KEY_TYPE = 'class_type' |
| const | TAX_CLASS_TYPE_CUSTOMER = 'CUSTOMER' |
| const | TAX_CLASS_TYPE_PRODUCT = 'PRODUCT' |
Data Fields inherited from CustomAttributesDataInterface | |
| const | CUSTOM_ATTRIBUTES = 'custom_attributes' |
Data Fields inherited from ExtensibleDataInterface | |
| const | EXTENSION_ATTRIBUTES_KEY = 'extension_attributes' |
Protected Member Functions | |
| checkClassCanBeDeleted () | |
Protected Member Functions inherited from AbstractExtensibleModel | |
| filterCustomAttributes ($data) | |
| initializeCustomAttributes () | |
| convertCustomAttributeValues (array &$customAttributes) | |
| getCustomAttributesCodes () | |
| _setExtensionAttributes (\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes) | |
| _getExtensionAttributes () | |
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 | |
| $_classFactory | |
Protected Attributes inherited from AbstractExtensibleModel | |
| $extensionAttributesFactory | |
| $extensionAttributes | |
| $customAttributeFactory | |
| $customAttributesCodes = null | |
| $customAttributesChanged = false | |
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 = [] |
Tax class model
Definition at line 15 of file ClassModel.php.
| __construct | ( | \Magento\Framework\Model\Context | $context, |
| \Magento\Framework\Registry | $registry, | ||
| \Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory, | ||
| AttributeValueFactory | $customAttributeFactory, | ||
| \Magento\Tax\Model\TaxClass\Factory | $classFactory, | ||
| \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 | |
| TaxClass\Factory | $classFactory | |
| \Magento\Framework\Model\ResourceModel\AbstractResource | $resource | |
| \Magento\Framework\Data\Collection\AbstractDb | $resourceCollection | |
| array | $data |
Definition at line 51 of file ClassModel.php.
| _construct | ( | ) |
| beforeDelete | ( | ) |
Validate tax class can be deleted
Definition at line 122 of file ClassModel.php.
|
protected |
Check whether this class can be deleted
| CouldNotDeleteException |
Definition at line 87 of file ClassModel.php.
| getClassId | ( | ) |
@codeCoverageIgnoreStart {Get tax class ID.
Implements TaxClassInterface.
Definition at line 132 of file ClassModel.php.
| getClassName | ( | ) |
{Get tax class name.
Implements TaxClassInterface.
Definition at line 140 of file ClassModel.php.
| getClassType | ( | ) |
{Get tax class type.
Implements TaxClassInterface.
Definition at line 148 of file ClassModel.php.
| getExtensionAttributes | ( | ) |
{Retrieve existing extension attributes object or create a new one.
Implements TaxClassInterface.
Definition at line 193 of file ClassModel.php.
| setClassId | ( | $classId | ) |
Set tax class ID.
| int | $classId |
Implements TaxClassInterface.
Definition at line 159 of file ClassModel.php.
| setClassName | ( | $className | ) |
Set tax class name.
| string | $className |
Implements TaxClassInterface.
Definition at line 170 of file ClassModel.php.
| setClassType | ( | $classType | ) |
Set tax class type.
| string | $classType |
Implements TaxClassInterface.
Definition at line 181 of file ClassModel.php.
| setExtensionAttributes | ( | \Magento\Tax\Api\Data\TaxClassExtensionInterface | $extensionAttributes | ) |
{Set an extension attributes object.
| \Magento\Tax\Api\Data\TaxClassExtensionInterface | $extensionAttributes |
| \Magento\Tax\Api\Data\TaxClassExtensionInterface | $extensionAttributes |
Implements TaxClassInterface.
Definition at line 204 of file ClassModel.php.
|
protected |
Definition at line 39 of file ClassModel.php.
| const KEY_ID = 'class_id' |
#+ Constants defined for keys of array, makes typos less likely
Definition at line 21 of file ClassModel.php.
| const KEY_NAME = 'class_name' |
Definition at line 22 of file ClassModel.php.
| const KEY_TYPE = 'class_type' |
Definition at line 23 of file ClassModel.php.
| const TAX_CLASS_TYPE_CUSTOMER = 'CUSTOMER' |
#- Defines Customer Tax Class string
Definition at line 29 of file ClassModel.php.
| const TAX_CLASS_TYPE_PRODUCT = 'PRODUCT' |
Defines Product Tax Class string
Definition at line 34 of file ClassModel.php.