eZPublishCommunityProject  2012.12
eZ\Publish\Core\FieldType\Image\ImageStorage Class Reference

Converter for Image field type external storage. More...

+ Inheritance diagram for eZ\Publish\Core\FieldType\Image\ImageStorage:
+ Collaboration diagram for eZ\Publish\Core\FieldType\Image\ImageStorage:

Public Member Functions

 __construct (array $gateways, FileService $fileService, PathGenerator $pathGenerator)
 Construct from gateways. More...
 
 deleteFieldData (VersionInfo $versionInfo, array $fieldIds, array $context)
 
 getFieldData (VersionInfo $versionInfo, Field $field, array $context)
 Populates $field value property based on the external data. More...
 
 getIndexData (VersionInfo $versionInfo, Field $field, array $context)
 
 hasFieldData ()
 Checks if field type has external data to deal with. More...
 
 storeFieldData (VersionInfo $versionInfo, Field $field, array $context)
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\GatewayBasedStorage
 __construct (array $gateways)
 Construct from gateways. More...
 
 addGateway ($identifier, StorageGateway $gateway)
 Adds a storage $gateway assigned to the given $identifier. More...
 

Protected Member Functions

 extractStorageIdentifier ($xml)
 Extracts the field storage path from the given $xml string. More...
 
 getFieldPath ($fieldId, $versionNo, $languageCode, $nodePathString)
 Returns the path where images for the defined $fieldId are stored. More...
 
- Protected Member Functions inherited from eZ\Publish\Core\FieldType\GatewayBasedStorage
 getGateway (array $context)
 Retrieve the fitting gateway, base on the identifier in $context. More...
 

Protected Attributes

 $fileService
 
 $pathGenerator
 
- Protected Attributes inherited from eZ\Publish\Core\FieldType\GatewayBasedStorage
 $gateways
 

Detailed Description

Converter for Image field type external storage.

The keyword storage ships a list (array) of keywords in $field->value->externalData. $field->value->data is simply empty, because no internal data is store.

Constructor & Destructor Documentation

eZ\Publish\Core\FieldType\Image\ImageStorage::__construct ( array  $gateways,
FileService  $fileService,
PathGenerator  $pathGenerator 
)

Construct from gateways.

Parameters
\eZ\Publish\Core\FieldType\StorageGateway[]$gateways
FileService$fileService
PathGenerator$pathGenerator

Member Function Documentation

eZ\Publish\Core\FieldType\Image\ImageStorage::deleteFieldData ( VersionInfo  $versionInfo,
array  $fieldIds,
array  $context 
)
Parameters
array$fieldIds
array$context
Returns
boolean

Implements eZ\Publish\SPI\FieldType\FieldStorage.

eZ\Publish\Core\FieldType\Image\ImageStorage::extractStorageIdentifier (   $xml)
protected

Extracts the field storage path from the given $xml string.

Parameters
string$xml
Returns
string|false

Referenced by eZ\Publish\Core\FieldType\Image\ImageStorage\deleteFieldData().

eZ\Publish\Core\FieldType\Image\ImageStorage::getFieldData ( VersionInfo  $versionInfo,
Field  $field,
array  $context 
)

Populates $field value property based on the external data.

$field->value is a eZ object. This value holds the data as a eZ based object, according to the field type (e.g. for TextLine, it will be a eZ object).

Parameters
\eZ\Publish\SPI\Persistence\Content\Field$field
array$context
Returns
void

Implements eZ\Publish\SPI\FieldType\FieldStorage.

eZ\Publish\Core\FieldType\Image\ImageStorage::getFieldPath (   $fieldId,
  $versionNo,
  $languageCode,
  $nodePathString 
)
protected

Returns the path where images for the defined $fieldId are stored.

Parameters
mixed$fieldId
int$versionNo
string$languageCode
string$nodePathString
Returns
string

Referenced by eZ\Publish\Core\FieldType\Image\ImageStorage\storeFieldData().

eZ\Publish\Core\FieldType\Image\ImageStorage::getIndexData ( VersionInfo  $versionInfo,
Field  $field,
array  $context 
)
Parameters
\eZ\Publish\SPI\Persistence\Content\Field$field
array$context

Implements eZ\Publish\SPI\FieldType\FieldStorage.

eZ\Publish\Core\FieldType\Image\ImageStorage::hasFieldData ( )

Checks if field type has external data to deal with.

Returns
boolean

Implements eZ\Publish\SPI\FieldType\FieldStorage.

eZ\Publish\Core\FieldType\Image\ImageStorage::storeFieldData ( VersionInfo  $versionInfo,
Field  $field,
array  $context 
)

Member Data Documentation

eZ\Publish\Core\FieldType\Image\ImageStorage::$fileService
protected
eZ\Publish\Core\FieldType\Image\ImageStorage::$pathGenerator
protected

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