eZPublishCommunityProject  2013.5
eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper Class Reference

Mapper for Content Type Handler. More...

Public Member Functions

 __construct (ConverterRegistry $converterRegistry)
 Creates a new content type mapper. More...
 
 createCreateStructFromType (Type $type)
 Creates a create struct from an existing $type. More...
 
 createGroupFromCreateStruct (GroupCreateStruct $struct)
 Creates a Group from its create struct. More...
 
 createTypeFromCreateStruct (CreateStruct $createStruct)
 Maps properties from $struct to $type. More...
 
 extractFieldFromRow (array $row)
 Creates a FieldDefinition from the data in $row. More...
 
 extractGroupsFromRows (array $rows)
 Extracts Group objects from the given $rows. More...
 
 extractTypesFromRows (array $rows)
 Extracts types and related data from the given $rows. More...
 
 toFieldDefinition (StorageFieldDefinition $storageFieldDef, FieldDefinition $fieldDef)
 Maps a FieldDefinition from the given $storageFieldDef. More...
 
 toStorageFieldDefinition (FieldDefinition $fieldDef, StorageFieldDefinition $storageFieldDef)
 Maps $fieldDef to the legacy storage specific StorageFieldDefinition. More...
 

Protected Member Functions

 extractStorageFieldFromRow (array $row)
 Extracts a StorageFieldDefinition from $row. More...
 
 extractTypeFromRow (array $row)
 Creates a Type from the data in $row. More...
 

Protected Attributes

 $converterRegistry
 

Detailed Description

Mapper for Content Type Handler.

Performs mapping of Type objects.

Constructor & Destructor Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::__construct ( ConverterRegistry  $converterRegistry)

Creates a new content type mapper.

Parameters
\eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry$converterRegistry

Member Function Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::createCreateStructFromType ( Type  $type)

Creates a create struct from an existing $type.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type$type
Returns
eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::createGroupFromCreateStruct ( GroupCreateStruct  $struct)

Creates a Group from its create struct.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type\Group\CreateStruct$struct
Todo:
$description is not supported by database, yet
Returns
Group
eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::createTypeFromCreateStruct ( CreateStruct  $createStruct)

Maps properties from $struct to $type.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type\CreateStruct$createStruct
Returns
eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::extractFieldFromRow ( array  $row)

Creates a FieldDefinition from the data in $row.

Parameters
array$row
Returns
eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::extractGroupsFromRows ( array  $rows)

Extracts Group objects from the given $rows.

Parameters
array$rows
Returns
[]
eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::extractStorageFieldFromRow ( array  $row)
protected

Extracts a StorageFieldDefinition from $row.

Parameters
array$row
Returns

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper\extractFieldFromRow().

eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::extractTypeFromRow ( array  $row)
protected

Creates a Type from the data in $row.

Parameters
array$row
Returns
Type

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper\extractTypesFromRows().

eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::extractTypesFromRows ( array  $rows)

Extracts types and related data from the given $rows.

Parameters
array$rows
Returns
array(Type)
eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::toFieldDefinition ( StorageFieldDefinition  $storageFieldDef,
FieldDefinition  $fieldDef 
)

Maps a FieldDefinition from the given $storageFieldDef.

Parameters
\eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition$storageFieldDef
\eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition$fieldDef
Returns
void

Referenced by eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper\extractFieldFromRow().

eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::toStorageFieldDefinition ( FieldDefinition  $fieldDef,
StorageFieldDefinition  $storageFieldDef 
)

Maps $fieldDef to the legacy storage specific StorageFieldDefinition.

Parameters
\eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition$fieldDef
\eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition$storageFieldDef
Returns
void

Member Data Documentation

eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::$converterRegistry
protected

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