Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | List of all members
eZImageAliasHandler Class Reference

Internal manager for the eZImage datatype. More...

## Public Member Functions
| __construct ( $contentObjectAttribute)
| 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)
| purgeAllAliases ()
| removeAliases ()
| removeAliasFile ( $aliasFile)
| updateAliasPath ( $dirpath, $name)
| domTree ()
| setHTTPFile ( $httpFile)
| httpFile ( $release=false)
| initializeFromHTTPFile ( $httpFile, $imageAltText=false)
| 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 ()

## Static Public Member Functions
| normalizeImageName ( $imageName)

## Public Attributes
| $ContentObjectAttributeData
| $ContentObjectAttribute
| Deprecated. Contains a reference to the object attribute. More...

## Protected Member Functions
| setAliasList ( $aliasList)
| setAliasVariation ( $aliasName, $variation)
| setAliasAttribute ( $aliasName, $attributeName, $value)

## Private Member Functions
| trimToFileSystemFileName ( $longName, $limit=200)
| aliasList ( $checkValidity=true)
| createOriginalAttributeXMLData ( $originalNode, $originalData)
| recreateDOMTree ()
| parseInformationNode ( $imageInfoNode)
| imageSerialNumberRaw ()

## Detailed Description

Internal manager for the eZImage datatype.

Takes care of image conversion and serialization from and to the internal XML format.

Note
  This handler was introduced in eZ Publish 3.3 and will detect older eZImage structures and convert them on the fly.
  The XML storage was improved in 3.8, from then it always stores the attribute ID, version and language in the <original> tag. This was required to get the new multi-language features to work.

Definition at line 27 of file ezimagealiashandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZImageAliasHandler::__construct | ( |  | $contentObjectAttribute | ) |

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

Parameters

  eZContentObjectAttribute | $contentObjectAttribute |

Definition at line 34 of file ezimagealiashandler.php.

References eZDebug\writeWarning().

## Member Function Documentation

## ◆ addImageAlias()

eZImageAliasHandler::addImageAlias | ( |  | $imageAlias | ) |

Adds the image alias structure $imageAlias to the content object attribute.

Definition at line 1376 of file ezimagealiashandler.php.

References addImageAliasToXML(), domTree(), and storeDOMTree().

## ◆ addImageAliases()

eZImageAliasHandler::addImageAliases | ( |  | $imageAliasList | ) |

Adds all the new image alias structures in $imageAliasList to the content object attribute.

Definition at line 1358 of file ezimagealiashandler.php.

References addImageAliasToXML(), domTree(), setAliasAttribute(), and storeDOMTree().

Referenced by imageAlias().

## ◆ addImageAliasToXML()

eZImageAliasHandler::addImageAliasToXML | ( |  | $domTree,
|  |  | $imageAlias
| ) |  |

Adds the image alias structure $imageAlias to the XML DOM document $domTree.

Definition at line 1388 of file ezimagealiashandler.php.

Referenced by addImageAlias(), addImageAliases(), and recreateDOMTree().

## ◆ aliasList()

eZImageAliasHandler::aliasList | ( |  | $checkValidity = `true` | ) |
| private

Returns
  A list of aliases structures for the current attribute.ezxml

The first this is called the XML data will be parsed into the internal structures. Subsequent calls will simply return the internal structure.

Definition at line 507 of file ezimagealiashandler.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), displayText(), eZImageManager\factory(), generateXMLData(), eZClusterFileHandler\instance(), parseInformationNode(), setAliasList(), setImageSerialNumber(), and setOriginalAttributeData().

Referenced by directoryPath(), imageAlias(), purgeAllAliases(), recreateDOMTree(), removeAliases(), setAttribute(), and updateAliasPath().

## ◆ attribute()

eZImageAliasHandler::attribute | ( |  | $attributeName | ) |

Returns
  the value of the attribute named $attributeName. See eZImageAliasHandler::attributes() for which attributes are available.

Definition at line 95 of file ezimagealiashandler.php.

References attributeFromOriginal(), and imageAlias().

Referenced by attributeFromOriginal(), displayText(), imageName(), and imageNameByNode().

## ◆ attributeFromOriginal()

& eZImageAliasHandler::attributeFromOriginal | ( |  | $attributeName | ) |

Returns
  The value of the attribute named $attributeName from the 'original' image alias.

This is a quick way for extracting information from the 'original' image alias.

Definition at line 113 of file ezimagealiashandler.php.

References attribute().

Referenced by attribute().

## ◆ attributes()

eZImageAliasHandler::attributes | ( |  | ) |

Lists all available image aliases as attributes as well as:

- alternative_text - The alternative text input by the user, can be empty
- original_filename - The name of image which it had on the users disk before it was uploaded
- is_valid - A boolean which says if there is an image here or not.

Definition at line 63 of file ezimagealiashandler.php.

References eZImageManager\factory().

## ◆ createImageInformationNode()

eZImageAliasHandler::createImageInformationNode | ( |  | $imageNode,
|  |  | $mimeData
| ) |  |

Definition at line 1277 of file ezimagealiashandler.php.

References eZDebug\writeDebug().

Referenced by generateXMLData(), initialize(), and recreateDOMTree().

## ◆ createOriginalAttributeXMLData()

eZImageAliasHandler::createOriginalAttributeXMLData | ( |  | $originalNode,
|  |  | $originalData
| ) |  |
| private

Creates XML attributes containing information on the original image attribute.

The new attributes will be appended to $originalNode.

Definition at line 871 of file ezimagealiashandler.php.

Referenced by initialize(), recreateDOMTree(), and setOriginalAttributeData().

## ◆ directoryPath()

eZImageAliasHandler::directoryPath | ( |  | ) |

Returns
  The full directory path to the image, this includes the var and storage directory.

Definition at line 227 of file ezimagealiashandler.php.

References aliasList().

## ◆ displayText()

eZImageAliasHandler::displayText | ( |  | $alternativeText = `null` | ) |

Returns
  A text string which can be used as display for the image.

The text string will either contain the alternative text from the attribute or the parameter $alternativeText if it is set.

Definition at line 214 of file ezimagealiashandler.php.

References attribute().

Referenced by aliasList(), imageAlias(), and setAttribute().

## ◆ domTree()

eZImageAliasHandler::domTree | ( |  | ) |

Returns
  the DOM tree for the current content object attribute.

Note
  It will cache the result in the DataTypeCustom member variable of the content object attribute in the 'dom_tree' key.

Definition at line 950 of file ezimagealiashandler.php.

References $ContentObjectAttributeData, and generateXMLData().

Referenced by addImageAlias(), addImageAliases(), setOriginalAttributeData(), and store().

## ◆ generateXMLData()

eZImageAliasHandler::generateXMLData | ( |  | ) |

Creates default information.

Definition at line 1629 of file ezimagealiashandler.php.

References createImageInformationNode(), eZImageManager\factory(), eZMimeType\findByFileContents(), and storeDOMTree().

Referenced by aliasList(), domTree(), and removeAliases().

## ◆ hasAttribute()

eZImageAliasHandler::hasAttribute | ( |  | $attributeName | ) |

Returns
  true if the attribute named $attributeName exists. See eZImageAliasHandler::attributes() for which attributes are available.

Definition at line 77 of file ezimagealiashandler.php.

References eZImageManager\factory().

## ◆ httpFile()

eZImageAliasHandler::httpFile | ( |  | $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

Definition at line 1076 of file ezimagealiashandler.php.

## ◆ imageAlias()

eZImageAliasHandler::imageAlias | ( |  | $aliasName | ) |

Returns
  The image alias structure for the alias named $aliasName.

This will create the image alias if it does not exist yet, this can involve running image operations to for instance scale the image.

Definition at line 419 of file ezimagealiashandler.php.

References addImageAliases(), aliasList(), eZImageFile\appendFilepath(), displayText(), eZImageManager\factory(), eZClusterFileHandler\instance(), and setAliasList().

Referenced by attribute().

## ◆ imageName()

eZImageAliasHandler::imageName | ( |  | $contentObjectAttribute,
|  |  | $contentVersion,
|  |  | $language = `false`
| ) |  |

Returns
  A normalized name for the image.

The image name will generated from the name of the current version. If this is empty it will use the object name or the alternative text.

This ensures that the image has a name which corresponds to the object it belongs to.

The normalization ensures that the name only contains filename and URL friendly characters.

Definition at line 247 of file ezimagealiashandler.php.

References attribute(), imageSerialNumber(), normalizeImageName(), ezpI18n\tr(), and trimToFileSystemFileName().

Referenced by initializeFromFile(), and initializeFromHTTPFile().

## ◆ imageNameByNode()

eZImageAliasHandler::imageNameByNode | ( |  | $contentObjectAttribute,
|  |  | $mainNode,
|  |  | $language = `false`
| ) |  |

Returns
  A normalized name for the image based on a node.

Similar to imageName() but fetches name information from the node $mainNode.

The normalization ensures that the name only contains filename and URL friendly characters.

Definition at line 286 of file ezimagealiashandler.php.

References attribute(), normalizeImageName(), ezpI18n\tr(), and trimToFileSystemFileName().

## ◆ imagePath()

eZImageAliasHandler::imagePath | ( |  | $contentObjectAttribute,
|  |  | $contentVersion,
|  |  | $isImageOwner = `null`
| ) |  |

Returns
  The storage path for the image.

The path is calculated by using information from the current object and version. If the object is in the node tree it will contain a path that matches the node path, if not it will be placed in the versioned storage repository.

Definition at line 319 of file ezimagealiashandler.php.

References isImageOwner(), originalAttributeData(), eZContentObjectVersion\STATUS_PUBLISHED, and eZSys\storageDirectory().

Referenced by initializeFromFile(), and initializeFromHTTPFile().

## ◆ imagePathByNode()

eZImageAliasHandler::imagePathByNode | ( |  | $contentObjectAttribute,
|  |  | $mainNode
| ) |  |

Returns
  The storage path for the image based on a node.

Similar to imagePath() but fetches name information from the node $mainNode.

Definition at line 369 of file ezimagealiashandler.php.

References originalAttributeData(), eZSys\storageDirectory(), and trimToFileSystemFileName().

## ◆ imageSerialNumber()

eZImageAliasHandler::imageSerialNumber | ( |  | ) |

Returns
  The current serial number, the value will be 1 or higher.

The serial number is used to create unique filenames for uploaded images, it will be increased each time an image is uploaded.

Note
  This was required to get around the problem where browsers caches image information, if two images were uploaded in one version (e.g. a draft) the browser would not load the new image since it thought it had not changed.

Definition at line 182 of file ezimagealiashandler.php.

References imageSerialNumberRaw().

Referenced by imageName(), initialize(), and recreateDOMTree().

## ◆ imageSerialNumberRaw()

eZImageAliasHandler::imageSerialNumberRaw | ( |  | ) |
| private

Returns
  The internal serial number.

It will check if a serial number exists and return that, if not a new one will be created and returned.

Definition at line 1619 of file ezimagealiashandler.php.

Referenced by imageSerialNumber(), and increaseImageSerialNumber().

## ◆ increaseImageSerialNumber()

eZImageAliasHandler::increaseImageSerialNumber | ( |  | ) |

Increases the serial by one.

Definition at line 195 of file ezimagealiashandler.php.

References imageSerialNumberRaw(), and setImageSerialNumber().

Referenced by initializeFromFile(), and initializeFromHTTPFile().

## ◆ initialize()

eZImageAliasHandler::initialize | ( |  | $mimeData,
|  |  | $originalFilename,
|  |  | $imageAltText = `false`
| ) |  |

Makes sure the attribute contains the image file mentioned in $mimeData. This involves removing any previous image (and image aliases), increasing the image name counter, figuring out the image size and creating the internal XML structure.

Returns
  `true` on success.

Definition at line 1196 of file ezimagealiashandler.php.

References eZImageFile\appendFilepath(), createImageInformationNode(), createOriginalAttributeXMLData(), eZImageManager\factory(), imageSerialNumber(), eZClusterFileHandler\instance(), originalAttributeData(), setAliasList(), setDOMTree(), and setOriginalAttributeDataValues().

Referenced by initializeFromFile(), and initializeFromHTTPFile().

## ◆ initializeFromFile()

eZImageAliasHandler::initializeFromFile | ( |  | $filename,
|  |  | $imageAltText = `false`,
|  |  | $originalFilename = `false`
| ) |  |

Initializes the content object attribute $contentObjectAttribute with the filename $filename. Optionally you may also specify the alternative text in the parameter $imageAltText.

See also
  initialize

Definition at line 1135 of file ezimagealiashandler.php.

References eZMimeType\changeDirectoryPath(), eZFileHandler\copy(), eZContentObject\fetch(), eZContentObjectAttribute\fetch(), eZContentObjectVersion\fetchVersion(), eZMimeType\findByFileContents(), imageName(), imagePath(), increaseImageSerialNumber(), initialize(), eZDir\mkdir(), removeAliases(), setOriginalAttributeDataValues(), and eZDebug\writeError().

## ◆ initializeFromHTTPFile()

eZImageAliasHandler::initializeFromHTTPFile | ( |  | $httpFile,
|  |  | $imageAltText = `false`
| ) |  |

Initializes the content object attribute with the uploaded HTTP file

Parameters

  eZHTTPFile | $httpFile |
  string | $imageAltText | Optional image ALT text

Returns
  TODO: FIXME

Definition at line 1099 of file ezimagealiashandler.php.

References eZMimeType\changeDirectoryPath(), eZContentObjectVersion\fetchVersion(), eZMimeType\findByFileContents(), eZMimeType\findByName(), eZMimeType\findByURL(), imageName(), imagePath(), increaseImageSerialNumber(), initialize(), removeAliases(), and setOriginalAttributeDataValues().

## ◆ isImageOwner()

eZImageAliasHandler::isImageOwner | ( |  | ) |

Returns
  `true` if this is considered to be owner of the image.

It will be considered an owner if attribute data is not a copy of another attribute. For instance each time a new image is uploaded this will return `true`.

Definition at line 162 of file ezimagealiashandler.php.

References originalAttributeData().

Referenced by imagePath(), and updateAliasPath().

## ◆ isStorageRequired()

eZImageAliasHandler::isStorageRequired | ( |  | ) |

Returns
  `true` if the image alias handler is required to store it's contents.

See also
  setStorageRequired, store

Definition at line 1514 of file ezimagealiashandler.php.

## ◆ normalizeImageName()

eZImageAliasHandler::normalizeImageName | ( |  | $imageName | ) |
| static

Normalized the image name $imageName by removing all characters that are not considered filename or URL friendly. The filename will also be in non-capital letters.

Definition at line 1045 of file ezimagealiashandler.php.

References eZURLAliasML\convertToAlias(), and eZCharTransform\instance().

Referenced by imageName(), and imageNameByNode().

## ◆ originalAttributeData()

eZImageAliasHandler::originalAttributeData | ( |  | ) |

Returns
  An array structure with information on which attribute originally created the current data.

This will only contain data if the attribute is a copy of another attribute, e.g in the case of a new version without an new image upload.

Definition at line 1537 of file ezimagealiashandler.php.

References $ContentObjectAttributeData, and setOriginalAttributeData().

Referenced by imagePath(), imagePathByNode(), initialize(), isImageOwner(), and recreateDOMTree().

## ◆ parseInformationNode()

eZImageAliasHandler::parseInformationNode | ( |  | $imageInfoNode | ) |
| private

Parses the information node and generates the internal information structures.

The information node contains information from the image itself, for instance EXIF data from a JPEG or TIFF image.

Parameters

  $imageInfoNode |

Returns
  $imageInformation array

Definition at line 984 of file ezimagealiashandler.php.

Referenced by aliasList().

## ◆ purgeAllAliases()

eZImageAliasHandler::purgeAllAliases | ( |  | ) |

Removes the images alias while keeping the original image.

See also
  eZCache::purgeAllAliases()

Definition at line 708 of file ezimagealiashandler.php.

References aliasList(), removeAliasFile(), and storeDOMTree().

## ◆ recreateDOMTree()

eZImageAliasHandler::recreateDOMTree | ( |  | ) |
| private

Recreates the DOM tree from the internal array structures and stores the DOM tree in the 'data_text' field of the attribute.

Definition at line 883 of file ezimagealiashandler.php.

References addImageAliasToXML(), aliasList(), createImageInformationNode(), createOriginalAttributeXMLData(), eZImageManager\factory(), eZMimeType\findByFileContents(), eZMimeType\findByURL(), imageSerialNumber(), eZClusterFileHandler\instance(), originalAttributeData(), and setDOMTree().

Referenced by setAttribute(), and updateAliasPath().

## ◆ removeAliases()

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

Definition at line 738 of file ezimagealiashandler.php.

References aliasList(), generateXMLData(), and removeAliasFile().

Referenced by initializeFromFile(), and initializeFromHTTPFile().

## ◆ removeAliasFile()

eZImageAliasHandler::removeAliasFile | ( |  | $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 |

Returns
  array bool true if something was actually done, false otherwise

Definition at line 764 of file ezimagealiashandler.php.

References eZDir\cleanupEmptyDirectories(), eZImageFile\definition(), eZClusterFileHandler\instance(), eZImageFile\isReferencedByOtherAttributes(), eZImageFile\isReferencedByOtherImageFiles(), eZPersistentObject\removeObject(), and eZDebug\writeError().

Referenced by purgeAllAliases(), and removeAliases().

## ◆ resetImageSerialNumber()

eZImageAliasHandler::resetImageSerialNumber | ( |  | ) |

Resets the serial number to zero.

Definition at line 203 of file ezimagealiashandler.php.

References setImageSerialNumber().

Referenced by updateAliasPath().

## ◆ setAliasAttribute()

eZImageAliasHandler::setAliasAttribute | ( |  | $aliasName,
|  |  | $attributeName,
|  |  | $value
| ) |  |
| protected

Set alias value.

Parameters

  aliasName | alias name
  attributeName | attribute name
  value | attribute value

Definition at line 495 of file ezimagealiashandler.php.

Referenced by addImageAliases(), and setAttribute().

## ◆ setAliasList()

eZImageAliasHandler::setAliasList | ( |  | $aliasList | ) |
| protected

Set alias list. Set alias list to current object

Parameters

  aliasList | alias list

Definition at line 472 of file ezimagealiashandler.php.

Referenced by aliasList(), imageAlias(), and initialize().

## ◆ setAliasVariation()

eZImageAliasHandler::setAliasVariation | ( |  | $aliasName,
|  |  | $variation
| ) |  |
| protected

Definition at line 483 of file ezimagealiashandler.php.

Referenced by updateAliasPath().

## ◆ setAttribute()

eZImageAliasHandler::setAttribute | ( |  | $attributeName,
|  |  | $attributeValue
| ) |  |

Sets the attribute named $attributeName to have the value $attributeValue.

The following attributes can be set:

- alternative text
- original_filename

Definition at line 129 of file ezimagealiashandler.php.

References aliasList(), displayText(), recreateDOMTree(), setAliasAttribute(), and setStorageRequired().

## ◆ setDOMTree()

eZImageAliasHandler::setDOMTree | ( |  | $domTree | ) |

Sets the XML DOM document $domTree as the current DOM document.

Definition at line 1438 of file ezimagealiashandler.php.

Referenced by initialize(), recreateDOMTree(), and setOriginalAttributeDataFromAttribute().

## ◆ setHTTPFile()

eZImageAliasHandler::setHTTPFile | ( |  | $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

Definition at line 1064 of file ezimagealiashandler.php.

## ◆ setImageSerialNumber()

eZImageAliasHandler::setImageSerialNumber | ( |  | $val | ) |

Set internal serial number

Parameters

  val | value

Definition at line 1608 of file ezimagealiashandler.php.

Referenced by aliasList(), increaseImageSerialNumber(), and resetImageSerialNumber().

## ◆ setOriginalAttributeData()

eZImageAliasHandler::setOriginalAttributeData | ( |  | $originalData | ) |

Sets the information on which attribute the data was fetched from. See eZImageAliasHandler::originalAttributeData() for more information.

Definition at line 1554 of file ezimagealiashandler.php.

References createOriginalAttributeXMLData(), and domTree().

Referenced by aliasList(), originalAttributeData(), setOriginalAttributeDataFromAttribute(), and setOriginalAttributeDataValues().

## ◆ setOriginalAttributeDataFromAttribute()

eZImageAliasHandler::setOriginalAttributeDataFromAttribute | ( |  | $contentObjectAttribute | ) |

Sets the information on which attribute the data was fetched from.

Fetches data from the contentobject attribute $contentObjectAttribute and sets it using setOriginalAttributeData().

Definition at line 1573 of file ezimagealiashandler.php.

References setDOMTree(), setOriginalAttributeData(), and setOriginalAttributeDataValues().

## ◆ setOriginalAttributeDataValues()

eZImageAliasHandler::setOriginalAttributeDataValues | ( |  | $attributeID,
|  |  | $attributeVersion,
|  |  | $attributeLanguage
| ) |  |

Sets the information on which attribute the data was fetched from.

Fetches data from the parameters and sets it using setOriginalAttributeData().

Definition at line 1596 of file ezimagealiashandler.php.

References setOriginalAttributeData().

Referenced by initialize(), initializeFromFile(), initializeFromHTTPFile(), and setOriginalAttributeDataFromAttribute().

## ◆ setStorageRequired()

eZImageAliasHandler::setStorageRequired | ( |  | $require = `true` | ) |

Sets whether storage of the image alias data is required or not.

See also
  isStorageRequired, store

Definition at line 1525 of file ezimagealiashandler.php.

Referenced by setAttribute(), store(), and updateAliasPath().

## ◆ store()

eZImageAliasHandler::store | ( |  | $contentObjectAttribute | ) |

Stores the data in the image alias handler to the content object attribute.

See also
  isStorageRequired, setStorageRequired

Definition at line 1488 of file ezimagealiashandler.php.

References domTree(), setStorageRequired(), and storeDOMTree().

## ◆ storeDOMTree()

eZImageAliasHandler::storeDOMTree | ( |  | $domTree,
|  |  | $storeAttribute,
|  |  | $contentObjectAttributeRef
| ) |  |

Stores the XML DOM document $domTree to the content object attribute.

Definition at line 1447 of file ezimagealiashandler.php.

References eZContentObjectAttribute\fetch(), and eZDebug\writeError().

Referenced by addImageAlias(), addImageAliases(), generateXMLData(), purgeAllAliases(), and store().

## ◆ trimToFileSystemFileName()

eZImageAliasHandler::trimToFileSystemFileName | ( |  | $longName,
|  |  | $limit = `200`
| ) |  |
| private

Trims a filename to a given limit (in bytes). It can be used to avoid file system limitations

Parameters

  string | $longName |
  int | $limit | in bytes

Returns
  string shortened name

Definition at line 403 of file ezimagealiashandler.php.

Referenced by imageName(), imageNameByNode(), and imagePathByNode().

## ◆ updateAliasPath()

eZImageAliasHandler::updateAliasPath | ( |  | $dirpath,
|  |  | $name
| ) |  |

Will update the path for images to point to the new path $dirpath and filename $name.

This is usually called when the object contain the image attribute is moved in the tree.

Definition at line 809 of file ezimagealiashandler.php.

References aliasList(), eZImageFile\appendFilepath(), eZMimeType\changeFileData(), eZDir\cleanupEmptyDirectories(), eZImageFile\fetchImageAttributesByFilepath(), eZClusterFileHandler\instance(), isImageOwner(), eZDir\mkdir(), eZImageFile\moveFilepath(), recreateDOMTree(), resetImageSerialNumber(), setAliasVariation(), and setStorageRequired().

## Member Data Documentation

## ◆ $ContentObjectAttribute

eZImageAliasHandler::$ContentObjectAttribute

Deprecated. Contains a reference to the object attribute.

Definition at line 1666 of file ezimagealiashandler.php.

## ◆ $ContentObjectAttributeData

eZImageAliasHandler::$ContentObjectAttributeData

Contains a some eZContentObjectAttribute's attributes.

Definition at line 1664 of file ezimagealiashandler.php.

Referenced by domTree(), and originalAttributeData().

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

- ezimagealiashandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.