eZPublish  4.4
eZImageType Class Reference

The class eZImageType handles image accounts and association with content objects. More...

+ Inheritance diagram for eZImageType:
+ Collaboration diagram for eZImageType:

Public Member Functions

 customObjectAttributeHTTPAction ($http, $action, $contentObjectAttribute, $parameters)
 
 deleteStoredObjectAttribute ($contentObjectAttribute, $version=null)
 
 eZImageType ()
 
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 Fetch object attribute http input, override the ezDataType method This method is triggered when submiting a http form which includes Image class Image is stored into file system every time there is a file input and validation result is valid. More...
 
 fromString ($objectAttribute, $string)
 
 hasObjectAttributeContent ($contentObjectAttribute)
 
 hasStoredFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 
 insertHTTPFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
 
 insertRegularFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$result)
 
 isHTTPFileInsertionSupported ()
 
 isRegularFileInsertionSupported ()
 
 metaData ($contentObjectAttribute)
 
 objectAttributeContent ($contentObjectAttribute)
 
 onPublish ($contentObjectAttribute, $contentObject, $publishedNodes)
 
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 serializeContentObjectAttribute ($package, $objectAttribute)
 
 storedFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 storeObjectAttribute ($contentObjectAttribute)
 
 supportsBatchInitializeObjectAttribute ()
 
 title ($contentObjectAttribute, $name= 'original_filename')
 
 toString ($objectAttribute)
 
 trashStoredObjectAttribute ($contentObjectAttribute, $version=null)
 
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 Validate the object attribute input in http. More...
 
- Public Member Functions inherited from eZDataType
 attribute ($attr)
 
 attributes ()
 
 batchInitializeObjectAttributeData ($classAttribute)
 
 classAttributeContent ($classAttribute)
 
 classAttributeRemovableInformation ($classAttribute, $includeAll=true)
 
 classDisplayInformation ($classAttribute, $mergeInfo=false)
 
 cloneClassAttribute ($oldClassAttribute, $newClassAttribute)
 
 contentActionList ($classAttribute)
 Return content action(s) which can be performed on object containing the current datatype. More...
 
 createContentObjectAttributeDOMNode ($objectAttribute)
 Create empty content object attribute DOM node. More...
 
 customClassAttributeHTTPAction ($http, $action, $classAttribute)
 
 customObjectAttributeHTTPAction ($http, $action, $objectAttribute, $parameters)
 
 customSorting ()
 
 customSortingSQL ($params)
 
 deleteStoredClassAttribute ($classAttribute, $version=null)
 
 deleteStoredObjectAttribute ($objectAttribute, $version=null)
 
 diff ($old, $new, $options=false)
 
 editTemplate ($contentobjectAttribute)
 
 eZDataType ($dataTypeString, $name, $properties=array())
 
 fetchActionValue ($action, $actionName, &$value)
 
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 fetchCollectionAttributeHTTPInput ($collection, $collectionAttribute, $http, $base, $objectAttribute)
 
 fetchObjectAttributeHTTPInput ($http, $base, $objectAttribute)
 
 fixRelatedObjectItem ($contentObjectAttribute, $objectID, $mode)
 
 fixupClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 fixupCollectionAttributeHTTPInput ($http, $base, $objectAttribute)
 
 fixupObjectAttributeHTTPInput ($http, $base, $objectAttribute)
 
 fromString ($objectAttribute, $string)
 
 getDBAExtensionFilePath ()
 
 getDBAFileName ()
 
 getDBAFilePath ($checkExtensions=true)
 
 handleCustomObjectHTTPActions ($http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
 
 handleDownload ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 hasAttribute ($attr)
 
 hasInformationCollection ()
 
 hasObjectAttributeContent ($contentObjectAttribute)
 
 hasStoredFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 importDBDataFromDBAFile ($dbaFilePath=false)
 
 informationTemplate ($contentobjectAttribute)
 
 initializeClassAttribute ($classAttribute)
 
 initializeObjectAttribute ($objectAttribute, $currentVersion, $originalContentObjectAttribute)
 
 insertHTTPFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
 
 insertRegularFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$result)
 
 insertSimpleString ($object, $objectVersion, $objectLanguage, $objectAttribute, $string, &$result)
 
 isA ()
 
 isAddToBasketValidationRequired ()
 
 isClassAttributeRemovable ($classAttribute)
 
 isHTTPFileInsertionSupported ()
 
 isIndexable ()
 
 isInformationCollector ()
 
 isRegularFileInsertionSupported ()
 
 isSimpleStringInsertionSupported ()
 
 isTranslatable ()
 Indicates if datatype supports being translated. More...
 
 metaData ($contentObjectAttribute)
 
 objectAttributeContent ($objectAttribute)
 
 objectDisplayInformation ($objectAttribute, $mergeInfo=false)
 
 onPublish ($contentObjectAttribute, $contentObject, $publishedNodes)
 
 postInitializeObjectAttribute ($objectAttribute, $currentVersion, $originalContentObjectAttribute)
 
 postStore ($objectAttribute)
 
 postUnserializeContentObjectAttribute ($package, $objectAttribute)
 
 preStoreClassAttribute ($classAttribute, $version)
 
 preStoreDefinedClassAttribute ($classAttribute)
 
 preStoreModifiedClassAttribute ($classAttribute)
 
 preStoreVersionedClassAttribute ($classAttribute, $version)
 Hook function which is called before an content class attribute is stored. More...
 
 productOptionInformation ($objectAttribute, $optionID, $productItem)
 
 removeRelatedObjectItem ($contentObjectAttribute, $objectID)
 
 repairContentObjectAttribute ($contentObjectAttribute)
 
 resultTemplate (&$collectionAttribute)
 
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 serializeContentObjectAttribute ($package, $objectAttribute)
 
 sortKey ($objectAttribute)
 
 sortKeyType ()
 
 storeClassAttribute ($classAttribute, $version)
 
 storeDefinedClassAttribute ($classAttribute)
 
 storedFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 storeModifiedClassAttribute ($classAttribute)
 
 storeObjectAttribute ($objectAttribute)
 
 storeVersionedClassAttribute ($classAttribute, $version)
 
 supportsBatchInitializeObjectAttribute ()
 
 templateList ()
 
 title ($objectAttribute, $name=null)
 
 toString ($objectAttribute)
 
 trashStoredObjectAttribute ($objectAttribute, $version=null)
 
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 
 validateAddToBasket ($objectAttribute, $data, &$errors)
 
 validateClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 validateCollectionAttributeHTTPInput ($http, $base, $objectAttribute)
 
 validateObjectAttributeHTTPInput ($http, $base, $objectAttribute)
 
 viewTemplate ($contentobjectAttribute)
 

Public Attributes

const DATA_TYPE_STRING = "ezimage"
 
const FILESIZE_FIELD = 'data_int1'
 
const FILESIZE_VARIABLE = '_ezimage_max_filesize_'
 
- Public Attributes inherited from eZDataType
 $DataTypeString
 The datatype string ID, used for uniquely identifying a datatype. More...
 
 $Name
 The descriptive name of the datatype, usually used for displaying to the user. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from eZDataType
static allowedTypes ()
 
static create ($dataTypeString)
 
static loadAndRegisterAllTypes ()
 
static loadAndRegisterType ($type)
 
static register ($dataTypeString, $className)
 
static registeredDataTypes ()
 

Detailed Description

The class eZImageType handles image accounts and association with content objects.

Note
The method initializeObjectAttribute was removed in 3.8, the new storage technique removes the need to have it.

Member Function Documentation

eZImageType::customObjectAttributeHTTPAction (   $http,
  $action,
  $contentObjectAttribute,
  $parameters 
)
eZImageType::deleteStoredObjectAttribute (   $contentObjectAttribute,
  $version = null 
)
eZImageType::eZImageType ( )
eZImageType::fetchClassAttributeHTTPInput (   $http,
  $base,
  $classAttribute 
)
eZImageType::fetchObjectAttributeHTTPInput (   $http,
  $base,
  $contentObjectAttribute 
)

Fetch object attribute http input, override the ezDataType method This method is triggered when submiting a http form which includes Image class Image is stored into file system every time there is a file input and validation result is valid.

Parameters
$httphttp object
$base
$contentObjectAttribute: the content object attribute being handled
Returns
true if content object is not null, false if content object is null
eZImageType::fromString (   $objectAttribute,
  $string 
)
eZImageType::hasObjectAttributeContent (   $contentObjectAttribute)
eZImageType::hasStoredFileInformation (   $object,
  $objectVersion,
  $objectLanguage,
  $objectAttribute 
)

We support file information

eZImageType::initializeObjectAttribute (   $contentObjectAttribute,
  $currentVersion,
  $originalContentObjectAttribute 
)
eZImageType::insertHTTPFile (   $object,
  $objectVersion,
  $objectLanguage,
  $objectAttribute,
  $httpFile,
  $mimeData,
$result 
)

Inserts the file using the Image Handler eZImageAliasHandler.

eZImageType::insertRegularFile (   $object,
  $objectVersion,
  $objectLanguage,
  $objectAttribute,
  $filePath,
$result 
)

Inserts the file using the Image Handler eZImageAliasHandler.

eZImageType::isHTTPFileInsertionSupported ( )

HTTP file insertion is supported.

eZImageType::isRegularFileInsertionSupported ( )

Regular file insertion is supported.

eZImageType::metaData (   $contentObjectAttribute)
eZImageType::objectAttributeContent (   $contentObjectAttribute)
eZImageType::onPublish (   $contentObjectAttribute,
  $contentObject,
  $publishedNodes 
)
eZImageType::serializeContentClassAttribute (   $classAttribute,
  $attributeNode,
  $attributeParametersNode 
)
eZImageType::serializeContentObjectAttribute (   $package,
  $objectAttribute 
)
Returns
a DOM representation of the content object attribute
eZImageType::storedFileInformation (   $object,
  $objectVersion,
  $objectLanguage,
  $objectAttribute 
)

Extracts file information for the image entry.

eZImageType::storeObjectAttribute (   $contentObjectAttribute)
eZImageType::supportsBatchInitializeObjectAttribute ( )
eZImageType::title (   $contentObjectAttribute,
  $name = 'original_filename' 
)

Will return one of the following items from the original alias.

  • alternative_text - If it's not empty
  • Default paramater in $name if it exists
  • original_filename, this is the default fallback.
eZImageType::toString (   $objectAttribute)
Returns
string representation of an contentobjectattribute data for simplified export
eZImageType::trashStoredObjectAttribute (   $contentObjectAttribute,
  $version = null 
)

The object is being moved to trash, do any necessary changes to the attribute. Rename file and update db row with new name, so that access to the file using old links no longer works.

eZImageType::unserializeContentClassAttribute (   $classAttribute,
  $attributeNode,
  $attributeParametersNode 
)
eZImageType::unserializeContentObjectAttribute (   $package,
  $objectAttribute,
  $attributeNode 
)
eZImageType::validateObjectAttributeHTTPInput (   $http,
  $base,
  $contentObjectAttribute 
)

Validate the object attribute input in http.

If there is validation failure, there failure message will be put into $contentObjectAttribute->ValidationError

Parameters
$http,:http object
$base,:
$contentObjectAttribute,:content object attribute being validated
Returns
validation result- eZInputValidator::STATE_INVALID or eZInputValidator::STATE_ACCEPTED
See Also
kernel/classes/eZDataTypevalidateObjectAttributeHTTPInput($http, $base, $objectAttribute)

Member Data Documentation

const eZImageType::DATA_TYPE_STRING = "ezimage"
const eZImageType::FILESIZE_FIELD = 'data_int1'
const eZImageType::FILESIZE_VARIABLE = '_ezimage_max_filesize_'

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