eZPublish  4.5
eZVatRule Class Reference

eZVatRule handles VAT charging rules for the default VAT handler. More...

+ Inheritance diagram for eZVatRule:
+ Collaboration diagram for eZVatRule:

Public Member Functions

 country ()
 Returns country name. More...
 
 eZVatRule ($row)
 
 setAttribute ($attr, $val)
 
 store ($fieldFilters=null)
 
 vatTypeName ()
 Return VAT type name. More...
 
 vatTypeObject ()
 Return VAT type object. More...
 
- Public Member Functions inherited from eZPersistentObject
 attribute ($attr, $noFunction=false)
 
 attributes ()
 
 eZPersistentObject ($row)
 
 fill ($row)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 remove ($conditions=null, $extraConditions=null)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 sync ($fieldFilters=null)
 

Static Public Member Functions

static create ()
 
static definition ()
 
static fetch ($id)
 
static fetchByVatType ($vatID)
 Fetch VAT rules referencing given VAT type. More...
 
static fetchCountByCategory ($categories)
 Fetch number of VAT rules referencing given product categories. More...
 
static fetchCountByVatType ($vatID)
 Return number of VAT rules referencing given VAT type. More...
 
static fetchList ()
 
static removeReferencesToProductCategory ($cartegoryID)
 Remove references to the given product category. More...
 
static removeVatRule ($id)
 Remove given VAT charging rule. More...
 
- Static Public Member Functions inherited from eZPersistentObject
static conditionText ($conditions)
 
static conditionTextByRow ($conditions, $row)
 
static count ($def, $conds=null, $field=null)
 
static definition ()
 
static escapeArray ($array)
 
static fetchObject ($def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
static fetchObjectList ($def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
 
static getShortAttributeName ($db, $def, $attrName)
 
static handleRows ($rows, $class_name, $asObject)
 
static newObjectOrder ($def, $orderField, $conditions)
 
static removeObject ($def, $conditions=null, $extraConditions=null)
 
static reorderObject ($def, $orderField, $conditions, $down=true)
 
static swapRow ($table, $keys, $order_id, $rows, $id1, $id2)
 
static updateObjectList ($parameters)
 

Public Attributes

 $ProductCategories
 
- Public Attributes inherited from eZPersistentObject
 $PersistentDataDirty
 Whether the data is dirty, ie needs to be stored, or not. More...
 

Private Member Functions

 productCategories ()
 
 productCategoriesIDs ()
 Return IDs of product categories associated with the rule. More...
 
 productCategoriesNames ()
 Return names of product categories associated with the rule. More...
 
 productCategoriesString ()
 Return product categories as string, separated with commas. More...
 
 removeProductCategories ($ruleID=false)
 Remove product categories with the rule from DB. More...
 

Detailed Description

eZVatRule handles VAT charging rules for the default VAT handler.

Member Function Documentation

eZVatRule::country ( )

Returns country name.

static eZVatRule::create ( )
static
static eZVatRule::definition ( )
static
eZVatRule::eZVatRule (   $row)

Referenced by create().

static eZVatRule::fetch (   $id)
static
static eZVatRule::fetchByVatType (   $vatID)
static

Fetch VAT rules referencing given VAT type.

Parameters
$vatIDID of VAT type to count VAT rules for.

Referenced by eZVatType\removeThis().

static eZVatRule::fetchCountByCategory (   $categories)
static

Fetch number of VAT rules referencing given product categories.

Parameters
$categoriesCategory (single or list) to count VAT rules for.
Returns
int
static eZVatRule::fetchCountByVatType (   $vatID)
static

Return number of VAT rules referencing given VAT type.

Parameters
$vatIDID of VAT type to count VAT rules for.

Referenced by findDependencies().

static eZVatRule::fetchList ( )
static
eZVatRule::productCategories ( )
private
eZVatRule::productCategoriesIDs ( )
private

Return IDs of product categories associated with the rule.

eZVatRule::productCategoriesNames ( )
private

Return names of product categories associated with the rule.

eZVatRule::productCategoriesString ( )
private

Return product categories as string, separated with commas.

eZVatRule::removeProductCategories (   $ruleID = false)
private

Remove product categories with the rule from DB.

Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Referenced by removeVatRule(), and store().

static eZVatRule::removeReferencesToProductCategory (   $cartegoryID)
static

Remove references to the given product category.

Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Referenced by eZProductCategory\removeByID().

static eZVatRule::removeVatRule (   $id)
static

Remove given VAT charging rule.

Referenced by eZVatType\removeThis().

eZVatRule::setAttribute (   $attr,
  $val 
)
eZVatRule::store (   $fieldFilters = null)
eZVatRule::vatTypeName ( )

Return VAT type name.

eZVatRule::vatTypeObject ( )

Return VAT type object.

Member Data Documentation

eZVatRule::$ProductCategories

Referenced by productCategories().


The documentation for this class was generated from the following file: