Class

eZImageAliasHandler

class eZImageAliasHandler

Properties

$ContentObjectAttributeData
$ContentObjectAttribute

Methods

__construct(eZContentObjectAttribute $contentObjectAttribute)

Creates the handler and creates a reference to the contentobject attribute that created it.

attributes()

hasAttribute($attributeName)

attribute($attributeName)

attributeFromOriginal($attributeName)

setAttribute($attributeName, $attributeValue)

isImageOwner()

imageSerialNumber()

increaseImageSerialNumber()

resetImageSerialNumber()

displayText($alternativeText = null)

directoryPath()

imageName($contentObjectAttribute, $contentVersion, $language = false)

imageNameByNode($contentObjectAttribute, $mainNode, $language = false)

imagePath($contentObjectAttribute, $contentVersion, $isImageOwner = null)

imagePathByNode($contentObjectAttribute, $mainNode)

imageAlias($aliasName)

aliasList($checkValidity = true)

purgeAllAliases()

Removes the images alias while keeping the original image.

removeAliases()

Removes aliases from the attribute.

array removeAliasFile(string $aliasFile)

Removes $aliasFile and references to it for the attribute.

updateAliasPath($dirpath, $name)

createOriginalAttributeXMLData($originalNode, $originalData)

recreateDOMTree()

domTree()

parseInformationNode($imageInfoNode)

normalizeImageName($imageName)

setHTTPFile(mixed $httpFile)

Sets the uploaded HTTP file object to $httpFile.

httpFile(bool $release = false)

Returns the stored HTTP file object or false if no object is stored.

TODO: initializeFromHTTPFile(eZHTTPFile $httpFile, string $imageAltText = false)

Initializes the content object attribute with the uploaded HTTP file

initializeFromFile($filename, $imageAltText = false, $originalFilename = false)

initialize($mimeData, $originalFilename, $imageAltText = false)

createImageInformationNode($imageNode, $mimeData)

addImageAliases($imageAliasList)

addImageAlias($imageAlias)

addImageAliasToXML($domTree, $imageAlias)

setDOMTree($domTree)

storeDOMTree($domTree, $storeAttribute, $contentObjectAttributeRef)

store($contentObjectAttribute)

isStorageRequired()

setStorageRequired($require = true)

originalAttributeData()

setOriginalAttributeData($originalData)

setOriginalAttributeDataFromAttribute($contentObjectAttribute)

setOriginalAttributeDataValues($attributeID, $attributeVersion, $attributeLanguage)

setImageSerialNumber($val)

generateXMLData()

Details

at line 34
public __construct(eZContentObjectAttribute $contentObjectAttribute)

Creates the handler and creates a reference to the contentobject attribute that created it.

Parameters

eZContentObjectAttribute $contentObjectAttribute

at line 63
public attributes()

at line 77
public hasAttribute($attributeName)

Parameters

$attributeName

at line 95
public attribute($attributeName)

Parameters

$attributeName

at line 113
public attributeFromOriginal($attributeName)

Parameters

$attributeName

at line 129
public setAttribute($attributeName, $attributeValue)

Parameters

$attributeName
$attributeValue

at line 162
public isImageOwner()

at line 182
public imageSerialNumber()

at line 195
public increaseImageSerialNumber()

at line 203
public resetImageSerialNumber()

at line 214
public displayText($alternativeText = null)

Parameters

$alternativeText

at line 227
public directoryPath()

at line 247
public imageName($contentObjectAttribute, $contentVersion, $language = false)

Parameters

$contentObjectAttribute
$contentVersion
$language

at line 286
public imageNameByNode($contentObjectAttribute, $mainNode, $language = false)

Parameters

$contentObjectAttribute
$mainNode
$language

at line 319
public imagePath($contentObjectAttribute, $contentVersion, $isImageOwner = null)

Parameters

$contentObjectAttribute
$contentVersion
$isImageOwner

at line 369
public imagePathByNode($contentObjectAttribute, $mainNode)

Parameters

$contentObjectAttribute
$mainNode

at line 419
public imageAlias($aliasName)

Parameters

$aliasName

at line 507
public aliasList($checkValidity = true)

Parameters

$checkValidity

at line 708
public purgeAllAliases()

Removes the images alias while keeping the original image.

See also

eZCache::purgeAllAliases()

at line 738
public removeAliases()

Removes aliases from the attribute.

Files, as well as their references in ezimagefile, are only removed if this attribute/version was the last one referencing it. The attribute's XML is then reset to reference no image.

at line 764
public array removeAliasFile(string $aliasFile)

Removes $aliasFile and references to it for the attribute.

The eZImageFile entry as well as the file are only removed if this attribute was the last reference.

Parameters

string $aliasFile

Return Value

array bool true if something was actually done, false otherwise

at line 809
public updateAliasPath($dirpath, $name)

Parameters

$dirpath
$name

at line 871
public createOriginalAttributeXMLData($originalNode, $originalData)

Parameters

$originalNode
$originalData

at line 883
public recreateDOMTree()

at line 950
public domTree()

at line 984
public parseInformationNode($imageInfoNode)

Parameters

$imageInfoNode

at line 1045
public normalizeImageName($imageName)

Parameters

$imageName

at line 1064
public setHTTPFile(mixed $httpFile)

Sets the uploaded HTTP file object to $httpFile.

This object is used to store information about the image file until the content object attribute is to be stored.

Parameters

mixed $httpFile

See also

httpFile

at line 1076
public httpFile(bool $release = false)

Returns the stored HTTP file object or false if no object is stored.

Parameters

bool $release Erase the content of the stored HTTP file

See also

setHTTPFile

at line 1099
public TODO: initializeFromHTTPFile(eZHTTPFile $httpFile, string $imageAltText = false)

Initializes the content object attribute with the uploaded HTTP file

Parameters

eZHTTPFile $httpFile
string $imageAltText Optional image ALT text

Return Value

TODO: FIXME

at line 1135
public initializeFromFile($filename, $imageAltText = false, $originalFilename = false)

Parameters

$filename
$imageAltText
$originalFilename

at line 1196
public initialize($mimeData, $originalFilename, $imageAltText = false)

Parameters

$mimeData
$originalFilename
$imageAltText

at line 1277
public createImageInformationNode($imageNode, $mimeData)

Parameters

$imageNode
$mimeData

at line 1358
public addImageAliases($imageAliasList)

Parameters

$imageAliasList

at line 1376
public addImageAlias($imageAlias)

Parameters

$imageAlias

at line 1388
public addImageAliasToXML($domTree, $imageAlias)

Parameters

$domTree
$imageAlias

at line 1438
public setDOMTree($domTree)

Parameters

$domTree

at line 1447
public storeDOMTree($domTree, $storeAttribute, $contentObjectAttributeRef)

Parameters

$domTree
$storeAttribute
$contentObjectAttributeRef

at line 1488
public store($contentObjectAttribute)

Parameters

$contentObjectAttribute

at line 1514
public isStorageRequired()

at line 1525
public setStorageRequired($require = true)

Parameters

$require

at line 1537
public originalAttributeData()

at line 1554
public setOriginalAttributeData($originalData)

Parameters

$originalData

at line 1573
public setOriginalAttributeDataFromAttribute($contentObjectAttribute)

Parameters

$contentObjectAttribute

at line 1596
public setOriginalAttributeDataValues($attributeID, $attributeVersion, $attributeLanguage)

Parameters

$attributeID
$attributeVersion
$attributeLanguage

at line 1608
public setImageSerialNumber($val)

Parameters

$val

at line 1629
public generateXMLData()