- Class name: TaxCore
- Parent class: ObjectModel
- Source: classes/tax/Tax.php line 29
- $_product_country_tax
- $_product_tax_via_rules
- $account_number
- $active
- $deleted
- $fieldsRequired
- $fieldsRequiredLang
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $identifier
- $name
- $rate
- $table
- $webserviceParameters
- $_cache
- $fieldsRequiredDatabase
- $fieldsSize
- $id
- $id_lang
- $id_shop
- $image_dir
- $image_format
- $langMultiShop
- $tables
- __construct
- _onStatusChange
- add
- addFieldsRequiredDatabase
- associateTo
- clearCache
- delete
- deleteImage
- deleteSelection
- displayFieldName
- duplicateShops
- excludeTaxeOption
- existsInDatabase
- getAccountNumberByIdTax
- getCarrierTaxRate
- getFields
- getFieldsRequiredDatabase
- getFieldsValidateLang
- getIdentifier
- getProductEcotaxRate
- getProductTaxRate
- getProductTaxRateViaRules
- getTaxIdByName
- getTaxes
- getTranslationsFields
- getTranslationsFieldsChild
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- historize
- hydrate
- hydrateCollection
- isAssociatedToGroupShop
- isAssociatedToShop
- isCurrentlyUsed
- isLangMultishop
- isUsed
- makeTranslationFields
- save
- toggleStatus
- update
- validateControler
- validateController
- validateFields
- validateFieldsLang
protected mixed $_product_country_tax = array()
- Visibility: protected
- This property is static.
- Source: classes/tax/Tax.php line 55.
protected mixed $_product_tax_via_rules = array()
- Visibility: protected
- This property is static.
- Source: classes/tax/Tax.php line 56.
public string $account_number
- Visibility: public
- Source: classes/tax/Tax.php line 44.
public boolean $active
- Visibility: public
- Source: classes/tax/Tax.php line 38.
public boolean $deleted
- Visibility: public
- Source: classes/tax/Tax.php line 41.
protected mixed $fieldsRequired = array('rate')
- Visibility: protected
- Source: classes/tax/Tax.php line 46.
protected mixed $fieldsRequiredLang = array('name')
- Visibility: protected
- Source: classes/tax/Tax.php line 48.
protected mixed $fieldsSizeLang = array('name' => 32)
- Visibility: protected
- Source: classes/tax/Tax.php line 49.
protected mixed $fieldsValidate = array('rate' => 'isFloat')
- Visibility: protected
- Source: classes/tax/Tax.php line 47.
protected mixed $fieldsValidateLang = array('name' => 'isGenericName')
- Visibility: protected
- Source: classes/tax/Tax.php line 50.
protected mixed $identifier = 'id_tax'
- Visibility: protected
- Source: classes/tax/Tax.php line 53.
public string $name
- Visibility: public
- Source: classes/tax/Tax.php line 32.
public float $rate
- Visibility: public
- Source: classes/tax/Tax.php line 35.
protected mixed $table = 'tax'
- Visibility: protected
- Source: classes/tax/Tax.php line 52.
protected mixed $webserviceParameters = array('objectsNodeName' => 'taxes')
- Visibility: protected
- Source: classes/tax/Tax.php line 58.
protected mixed $_cache = array()
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 75.
protected \fieldsRequiredDatabase $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 50.
protected array $fieldsSize = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 53.
public integer $id
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 31.
protected integer $id_lang = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 34.
protected mixed $id_shop = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 36.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 78.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 81.
protected mixed $langMultiShop = false
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 67.
protected array $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 70.
mixed ObjectModelCore::__construct(integer $id, integer $id_lang, $id_shop)
Build object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 115
- $id integer - Existing object id in order to load object (optional)
- $id_lang integer - Required if object is multilingual (optional)
- $id_shop mixed
mixed TaxCore::_onStatusChange()
- Visibility: protected
- Source: classes/tax/Tax.php line 132
mixed ObjectModelCore::add($autodate, $nullValues)
Add current object to database
return boolean Insertion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 202
- $autodate mixed
- $nullValues mixed
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 780
- $fields mixed
boolean ObjectModelCore::associateTo(integer|array $id_shops, string $type)
This function associate an item to its context
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 828
- $id_shops integer|array
- $type string
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 794
- $all mixed
mixed TaxCore::delete()
- Visibility: public
- Source: classes/tax/Tax.php line 83
boolean ObjectModelCore::deleteImage()
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 898
mixed ObjectModelCore::deleteSelection($selection)
Delete several objects from database
return boolean Deletion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 387
- $selection mixed
mixed ObjectModelCore::displayFieldName($field, $className, $htmlentities, \Context $context)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 558
- $field mixed
- $className mixed
- $htmlentities mixed
- $context Context
mixed ObjectModelCore::duplicateShops($id)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 868
- $id mixed
mixed TaxCore::excludeTaxeOption()
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 179
boolean ObjectModelCore::existsInDatabase($id_entity, $table)
Specify if an ObjectModel is already in database
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 931
- $id_entity mixed - entity id
- $table mixed
string TaxCore::getAccountNumberByIdTax(integer $id_tax)
Returns the Account number of a Tax
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 281
- $id_tax integer
float TaxCore::getCarrierTaxRate($id_carrier, $id_address)
Returns the carrier tax rate
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 224
- $id_carrier mixed
- $id_address mixed
mixed TaxCore::getFields()
- Visibility: public
- Source: classes/tax/Tax.php line 62
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 772
- $all mixed
array ObjectModelCore::getFieldsValidateLang()
Get list of fields related to language to validate
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 975
string ObjectModelCore::getIdentifier()
Get object identifier name
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 964
float TaxCore::getProductEcotaxRate($id_address)
Returns the ecotax tax rate
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 208
- $id_address mixed
\Tax TaxCore::getProductTaxRate(integer $id_product, $id_address)
Returns the product tax
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 264
- $id_product integer
- $id_address mixed
\Tax TaxCore::getProductTaxRateViaRules(integer $id_product, integer $id_country, $id_state, $zipcode)
Return the product tax rate using the tax rules system
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 244
- $id_product integer
- $id_country integer
- $id_state mixed
- $zipcode mixed
mixed TaxCore::getTaxIdByName(string $tax_name, boolean $active)
Return the tax id associated to the specified name
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 190
- $tax_name string
- $active boolean - (true by default)
array TaxCore::getTaxes($id_lang, $active_only)
Get all available taxes
- Visibility: public
- This method is static.
- Source: classes/tax/Tax.php line 159
- $id_lang mixed
- $active_only mixed
mixed ObjectModelCore::getTranslationsFields(array $fieldsArray)
Prepare multilingual fields for database insertion
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 430
- $fieldsArray array - Multilingual fields to prepare return array Prepared fields for database insertion
array TaxCore::getTranslationsFieldsChild()
Check then return multilingual fields for database interaction
- Visibility: public
- Source: classes/tax/Tax.php line 77
array ObjectModelCore::getValidationRules(string $className)
Returns object validation rules (fields validity)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 89
- $className string - Child class name for static use (optional)
mixed ObjectModelCore::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 747
- $sql_join mixed
- $sql_filter mixed
- $sql_sort mixed
- $sql_limit mixed
mixed ObjectModelCore::getWebserviceParameters($wsParamsAttributeName)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 617
- $wsParamsAttributeName mixed
mixed TaxCore::historize()
Save the object with the field deleted to true
@return bool
- Visibility: public
- Source: classes/tax/Tax.php line 99
mixed ObjectModelCore::hydrate(array $data, integer $id_lang)
Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 987
- $data array
- $id_lang integer
array ObjectModelCore::hydrateCollection(string $class, array $datas, integer $id_lang)
Fill (hydrate) a list of objects in order to get a collection of these objects
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1006
- $class string - Class of objects to hydrate
- $datas array - List of data (multi-dimensional array)
- $id_lang integer
boolean ObjectModelCore::isAssociatedToGroupShop(integer $id_group_shop)
Check if current object is associated to a group shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 854
- $id_group_shop integer
boolean ObjectModelCore::isAssociatedToShop(integer $id_shop)
Check if current object is associated to a shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 809
- $id_shop integer
boolean ObjectModelCore::isCurrentlyUsed(string $table, boolean $has_active_column)
This method is allow to know if a entity is currently used
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 948
- $table string - name of table linked to entity
- $has_active_column boolean - true if the table has an active column
mixed ObjectModelCore::isLangMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 888
boolean TaxCore::isUsed()
Returns true if the tax is used in an order details
- Visibility: public
- Source: classes/tax/Tax.php line 145
mixed ObjectModelCore::makeTranslationFields($fields, $fieldsArray, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 447
- $fields mixed
- $fieldsArray mixed
- $id_language mixed
mixed ObjectModelCore::save($nullValues, $autodate)
Save current object to database (add or update)
return boolean Insertion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 192
- $nullValues mixed
- $autodate mixed
mixed TaxCore::toggleStatus()
- Visibility: public
- Source: classes/tax/Tax.php line 105
mixed TaxCore::update($nullValues)
- Visibility: public
- Source: classes/tax/Tax.php line 113
- $nullValues mixed
mixed ObjectModelCore::validateControler($htmlentities)
TODO: refactor rename all calls to this to validateController
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 571
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 577
- $htmlentities mixed
mixed ObjectModelCore::validateFields($die, $errorReturn)
Check for fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 481
- $die mixed
- $errorReturn mixed
mixed ObjectModelCore::validateFieldsLang($die, $errorReturn)
Check for multilingual fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 514
- $die mixed
- $errorReturn mixed