eZPublishCommunityProject  2013.4
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, IOService $IOService, PathGenerator $pathGenerator, MetadataHandler $imageSizeMetadataHandler)
 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=array())
 Construct from gateways. More...
 
 addGateway ($identifier, StorageGateway $gateway)
 Adds a storage $gateway assigned to the given $identifier. More...
 
 copyLegacyField (VersionInfo $versionInfo, Field $field, Field $originalField, array $context)
 This method is used exclusively by Legacy Storage to copy external data of existing field in main language to the untranslatable field not passed in create or update struct, but created implicitly in storage layer. More...
 

Protected Member Functions

 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

 $imageSizeMetadataHandler
 
 $IOService
 
 $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,
IOService  $IOService,
PathGenerator  $pathGenerator,
MetadataHandler  $imageSizeMetadataHandler 
)

Construct from gateways.

Parameters
\eZ\Publish\Core\FieldType\StorageGateway[]$gateways
IOService$IOService
PathGenerator$imageSizeMetadataHandler
MetadataHandler$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::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\VersionInfo$versionInfo
\eZ\Publish\SPI\Persistence\Content\Field$field
array$context
Exceptions
NotFoundExceptionIf the stored image path couldn't be retrieved by the IOService
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::$imageSizeMetadataHandler
protected
eZ\Publish\Core\FieldType\Image\ImageStorage::$IOService
protected
eZ\Publish\Core\FieldType\Image\ImageStorage::$pathGenerator
protected

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