eZPublishCommunityProject  2013.9
eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage Class Reference
+ Inheritance diagram for eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage:
+ Collaboration diagram for eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage:

Public Member Functions

 deleteFieldData ($fieldId)
 Stores the keyword list from $field->value->externalData. More...
 
 getContentTypeId (Field $field)
 Retrieve the ContentType ID for the given $field. More...
 
 getFieldData (Field $field)
 Sets the list of assigned keywords into $field->value->externalData. More...
 
 setConnection ($dbHandler)
 Set database handler for this gateway. More...
 
 storeFieldData (Field $field, $contentTypeId)
 Stores the keyword list from $field->value->externalData. More...
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway
 deleteFieldData ($fieldId)
 
 getContentTypeId (Field $field)
 Retrieve the ContentType ID for the given $field. More...
 
 getFieldData (Field $field)
 Sets the list of assigned keywords into $field->value->externalData. More...
 
 storeFieldData (Field $field, $contentTypeId)
 
- Public Member Functions inherited from eZ\Publish\Core\FieldType\StorageGateway
 setConnection ($connection)
 Sets the data storage connection to use. More...
 

Protected Member Functions

 assignKeywords ($fieldId, $keywordMap)
 Assigns keywords from $keywordMap to the field with $fieldId. More...
 
 deleteOldKeywordAssignments ($fieldId)
 
 getAssignedKeywords ($fieldId)
 Returns a list of keywords assigned to $fieldId. More...
 
 getConnection ()
 Returns the active connection. More...
 
 getExistingKeywords ($keywordList, $contentTypeId)
 Returns already existing keywords from $keywordList as a map. More...
 
 insertKeywords (array $keywordsToInsert, $contentTypeId)
 Inserts $keywordsToInsert for $fieldDefinitionId and returns a map of these keywords to their ID. More...
 
 loadContentTypeId ($fieldDefinitionId)
 Retrieves the content type ID for the given $fieldDefinitionId. More...
 

Protected Attributes

 $dbHandler
 

Member Function Documentation

eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::assignKeywords (   $fieldId,
  $keywordMap 
)
protected

Assigns keywords from $keywordMap to the field with $fieldId.

$keywordMap has the format: array( '<keyword>' => <id>, // ... );

Parameters
mixed$fieldId
mixed[]$keywordMap
Returns
void

Referenced by eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage\storeFieldData().

eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::deleteFieldData (   $fieldId)

Stores the keyword list from $field->value->externalData.

Parameters
mixed$fieldId
eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::deleteOldKeywordAssignments (   $fieldId)
protected
eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::getAssignedKeywords (   $fieldId)
protected

Returns a list of keywords assigned to $fieldId.

Parameters
mixed$fieldId
Returns
string[]

Referenced by eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage\getFieldData().

eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::getContentTypeId ( Field  $field)

Retrieve the ContentType ID for the given $field.

Parameters
\eZ\Publish\SPI\Persistence\Content\Field$field
Returns
mixed
eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::getExistingKeywords (   $keywordList,
  $contentTypeId 
)
protected

Returns already existing keywords from $keywordList as a map.

The map has the following format: array( '<keyword>' => <id>, // ... );

Parameters
string[]$keywordList
mixed$contentTypeId
Returns
mixed[]

Referenced by eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage\storeFieldData().

eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::getFieldData ( Field  $field)

Sets the list of assigned keywords into $field->value->externalData.

Parameters
Field$field
Returns
void
eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::insertKeywords ( array  $keywordsToInsert,
  $contentTypeId 
)
protected

Inserts $keywordsToInsert for $fieldDefinitionId and returns a map of these keywords to their ID.

The returned array has the following format: array( '<keyword>' => <id>, // ... );

Parameters
string[]$keywordsToInsert
mixed$contentTypeId
Returns
mixed[]
eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::loadContentTypeId (   $fieldDefinitionId)
protected

Retrieves the content type ID for the given $fieldDefinitionId.

Parameters
mixed$fieldDefinitionId
Returns
mixed

Referenced by eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage\getContentTypeId().

eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::setConnection (   $dbHandler)

Set database handler for this gateway.

Parameters
mixed$dbHandler
Returns
void
Exceptions
\RuntimeExceptionif $dbHandler is not an instance of eZ\Publish\Core\Persistence\Legacy\EzcDbHandler
eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\LegacyStorage::storeFieldData ( Field  $field,
  $contentTypeId 
)

Stores the keyword list from $field->value->externalData.

Parameters
\eZ\Publish\SPI\Persistence\Content\Field
mixed$contentTypeId

Member Data Documentation


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