eZ Publish  [4.2]
eZImageType Class Reference

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

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

List of all members.

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.
 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.

Public Attributes

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

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.

Definition at line 40 of file ezimagetype.php.


Member Function Documentation

eZImageType::customObjectAttributeHTTPAction ( http,
action,
objectAttribute,
parameters 
)

Executes a custom action for an object attribute which was defined on the web page.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 411 of file ezimagetype.php.

eZImageType::deleteStoredObjectAttribute ( objectAttribute,
version = null 
)

Clean up stored object attribute

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 111 of file ezimagetype.php.

eZImageType::eZImageType ( )

Definition at line 46 of file ezimagetype.php.

eZImageType::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 399 of file ezimagetype.php.

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

Reimplemented from eZDataType.

Definition at line 214 of file ezimagetype.php.

eZImageType::fromString ( objectAttribute,
string 
)

Reimplemented from eZDataType.

Definition at line 546 of file ezimagetype.php.

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

Reimplemented from eZDataType.

Definition at line 445 of file ezimagetype.php.

eZImageType::hasStoredFileInformation ( object,
objectVersion,
objectLanguage,
objectAttribute 
)

We support file information

Reimplemented from eZDataType.

Definition at line 336 of file ezimagetype.php.

eZImageType::initializeObjectAttribute ( objectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Initializes the object attribute with some data.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 52 of file ezimagetype.php.

eZImageType::insertHTTPFile ( object,
objectVersion,
objectLanguage,
objectAttribute,
httpFile,
mimeData,
&$  result 
)

Inserts the file using the Image Handler eZImageAliasHandler.

Reimplemented from eZDataType.

Definition at line 290 of file ezimagetype.php.

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

Inserts the file using the Image Handler eZImageAliasHandler.

Reimplemented from eZDataType.

Definition at line 313 of file ezimagetype.php.

eZImageType::isHTTPFileInsertionSupported ( )

HTTP file insertion is supported.

Reimplemented from eZDataType.

Definition at line 274 of file ezimagetype.php.

eZImageType::isRegularFileInsertionSupported ( )

Regular file insertion is supported.

Reimplemented from eZDataType.

Definition at line 282 of file ezimagetype.php.

eZImageType::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 460 of file ezimagetype.php.

eZImageType::objectAttributeContent ( objectAttribute)

Returns the content data for the given content object attribute.

Reimplemented from eZDataType.

Definition at line 453 of file ezimagetype.php.

eZImageType::onPublish ( contentObjectAttribute,
contentObject,
publishedNodes 
)

Performs necessary actions with attribute data after object is published, it means that you have access to published nodes.

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.
Might be transaction unsafe.

Reimplemented from eZDataType.

Definition at line 365 of file ezimagetype.php.

eZImageType::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 468 of file ezimagetype.php.

eZImageType::serializeContentObjectAttribute ( package,
objectAttribute 
)
Returns:
a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 491 of file ezimagetype.php.

eZImageType::storedFileInformation ( object,
objectVersion,
objectLanguage,
objectAttribute 
)

Extracts file information for the image entry.

Reimplemented from eZDataType.

Definition at line 345 of file ezimagetype.php.

eZImageType::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 252 of file ezimagetype.php.

eZImageType::supportsBatchInitializeObjectAttribute ( )

Reimplemented from eZDataType.

Definition at line 564 of file ezimagetype.php.

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.

Reimplemented from eZDataType.

Definition at line 429 of file ezimagetype.php.

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

Reimplemented from eZDataType.

Definition at line 538 of file ezimagetype.php.

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.

Reimplemented from eZDataType.

Definition at line 65 of file ezimagetype.php.

eZImageType::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 479 of file ezimagetype.php.

eZImageType::unserializeContentObjectAttribute ( package,
objectAttribute,
attributeNode 
)

Unserialize contentobject attribute

Parameters:
package
objectAttributecontentobject attribute object
attributeNodeezdomnode object

Reimplemented from eZDataType.

Definition at line 511 of file ezimagetype.php.

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)

Reimplemented from eZDataType.

Definition at line 134 of file ezimagetype.php.


Member Data Documentation

const eZImageType::DATA_TYPE_STRING = "ezimage"

Definition at line 44 of file ezimagetype.php.

const eZImageType::FILESIZE_FIELD = 'data_int1'

Definition at line 42 of file ezimagetype.php.

const eZImageType::FILESIZE_VARIABLE = '_ezimage_max_filesize_'

Definition at line 43 of file ezimagetype.php.


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