eZ Publish  [trunk]
eZPriceType Class Reference

Stores a price (float) More...

+ Inheritance diagram for eZPriceType:
+ Collaboration diagram for eZPriceType:

List of all members.

Public Member Functions

 classAttributeContent ($classAttribute)
 contentActionList ($classAttribute)
 Return content action(s) which can be performed on object containing the current datatype.
 eZPriceType ()
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fromString ($contentObjectAttribute, $string)
 hasObjectAttributeContent ($contentObjectAttribute)
 initializeClassAttribute ($classAttribute)
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 sortKey ($contentObjectAttribute)
 sortKeyType ()
 storeObjectAttribute ($attribute)
 supportsBatchInitializeObjectAttribute ()
 title ($contentObjectAttribute, $name=null)
 toString ($contentObjectAttribute)
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Public Attributes

const DATA_TYPE_STRING = "ezprice"
const EXCLUDED_VAT = 2
const INCLUDE_VAT_FIELD = 'data_int1'
const INCLUDE_VAT_VARIABLE = '_ezprice_include_vat_'
const INCLUDED_VAT = 1
const VAT_ID_FIELD = 'data_float1'
const VAT_ID_VARIABLE = '_ezprice_vat_id_'

Detailed Description

Stores a price (float)

Definition at line 18 of file ezpricetype.php.


Member Function Documentation

eZPriceType::classAttributeContent ( classAttribute)

Returns class content.

Reimplemented from eZDataType.

Definition at line 173 of file ezpricetype.php.

eZPriceType::contentActionList ( classAttribute)

Return content action(s) which can be performed on object containing the current datatype.

Return format is array of arrays with key 'name' and 'action'. 'action' can be mapped to url in datatype.ini

Parameters:
eZContentClassAttribute$classAttribute
Returns:
array

Reimplemented from eZDataType.

Definition at line 188 of file ezpricetype.php.

Definition at line 28 of file ezpricetype.php.

eZPriceType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 113 of file ezpricetype.php.

eZPriceType::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Fetches the http post var integer input and stores it in the data instance.

Reimplemented from eZDataType.

Definition at line 133 of file ezpricetype.php.

eZPriceType::fromString ( contentObjectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 232 of file ezpricetype.php.

eZPriceType::hasObjectAttributeContent ( contentObjectAttribute)
Returns:
true if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 216 of file ezpricetype.php.

Set default class attribute value

Reimplemented from eZDataType.

Definition at line 107 of file ezpricetype.php.

eZPriceType::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

reimp

Reimplemented from eZDataType.

Definition at line 93 of file ezpricetype.php.

eZPriceType::metaData ( contentObjectAttribute)
Returns:
the text which should be indexed in the search engine. An associative array can be returned to enable searching in specific parts of the data. E.g. array( 'first_column' => "foo", 'second_column' => "bar" );

Reimplemented from eZDataType.

Definition at line 85 of file ezpricetype.php.

eZPriceType::objectAttributeContent ( contentObjectAttribute)

Returns the content.

Reimplemented from eZDataType.

Definition at line 153 of file ezpricetype.php.

eZPriceType::serializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Adds the necessary dom structure to the attribute parameters.

Note:
The default is to add unsupported='true' to the attribute node, meaning that the datatype does not support serializing.

Reimplemented from eZDataType.

Definition at line 250 of file ezpricetype.php.

eZPriceType::sortKey ( objectAttribute)
Returns:
the sort key for the datatype. This is used for sorting on attribute level.

Reimplemented from eZDataType.

Definition at line 205 of file ezpricetype.php.

Returns:
the type of the sort key int|string False is returned if sorting is not supported

Reimplemented from eZDataType.

Definition at line 211 of file ezpricetype.php.

eZPriceType::storeObjectAttribute ( objectAttribute)

Stores the datatype data to the database which is related to the object attribute.

Returns:
True if the value was stored correctly.
Note:
The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
See also:
fetchObjectAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 81 of file ezpricetype.php.

Reimplemented from eZDataType.

Definition at line 316 of file ezpricetype.php.

eZPriceType::title ( objectAttribute,
name = null 
)

Returns the title of the current type, this is to form the title of the object.

Reimplemented from eZDataType.

Definition at line 200 of file ezpricetype.php.

eZPriceType::toString ( objectAttribute)
Returns:
string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 221 of file ezpricetype.php.

eZPriceType::unserializeContentClassAttribute ( classAttribute,
attributeNode,
attributeParametersNode 
)

Extracts values from the attribute parameters and sets it in the class attribute.

Note:
This function is called after the attribute has been stored and a second store is called after this function is done.

Reimplemented from eZDataType.

Definition at line 281 of file ezpricetype.php.

eZPriceType::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Validates the input and returns true if the input was valid for this datatype.

Reimplemented from eZDataType.

Definition at line 39 of file ezpricetype.php.


Member Data Documentation

const eZPriceType::DATA_TYPE_STRING = "ezprice"

Definition at line 20 of file ezpricetype.php.

Definition at line 26 of file ezpricetype.php.

Referenced by unserializeContentClassAttribute().

const eZPriceType::INCLUDE_VAT_VARIABLE = '_ezprice_include_vat_'

Definition at line 22 of file ezpricetype.php.

Definition at line 25 of file ezpricetype.php.

Referenced by unserializeContentClassAttribute().

const eZPriceType::VAT_ID_FIELD = 'data_float1'
const eZPriceType::VAT_ID_VARIABLE = '_ezprice_vat_id_'

Definition at line 24 of file ezpricetype.php.


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