PHP Class eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\PageConverter

Inheritance: implements eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter
Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
generateXmlString ( Page $page ) : string Generates XML string from $page object to be stored in storage engine.
getIndexColumn ( ) : string Returns the name of the index column in the attribute table.
restoreValueFromXmlString ( string $xmlString ) : Page Restores value from XML string.
toFieldDefinition ( StorageFieldDefinition $storageDef, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef ) Converts field definition data in $storageDef into $fieldDef.
toFieldValue ( StorageFieldValue $value, eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) Converts data from $value to $fieldValue.
toStorageFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef, StorageFieldDefinition $storageDef ) Converts field definition data in $fieldDef into $storageFieldDef.
toStorageValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $value, StorageFieldValue $storageFieldValue ) Converts data from $value to $storageFieldValue.

Protected Methods

Method Description
generateBlockXmlString ( Block $block, DOMDocument $dom ) : DOMElement Generates XML string for a given $block object.
generateItemXmlString ( Item $item, DOMDocument $dom ) : boolean | DOMElement Generates XML string for a given $item object.
generateZoneXmlString ( Zone $zone, DOMDocument $dom ) : DOMElement Generates XML string for a given $zone object.
restoreBlockFromXml ( DOMElement $node ) : Block Restores value for a given Block $node.
restoreItemFromXml ( DOMElement $node ) : Item Restores value for a given Item $node.
restoreZoneFromXml ( DOMElement $node ) : Zone Restores value for a given Zone $node.

Private Methods

Method Description
addNewNotEmptyXmlElement ( DOMDocument $dom, DOMElement $node, string $name, string $value ) Utility method to add new elements to an xml node if their value is not empty.
addNewXmlElement ( DOMDocument $dom, DOMElement $node, string $name, string $value ) Utility method to add new elements to an xml node.

Method Details

generateBlockXmlString() protected method

Generates XML string for a given $block object.
protected generateBlockXmlString ( Block $block, DOMDocument $dom ) : DOMElement
$block eZ\Publish\Core\FieldType\Page\Parts\Block
$dom DOMDocument
return DOMElement

generateItemXmlString() protected method

Generates XML string for a given $item object.
protected generateItemXmlString ( Item $item, DOMDocument $dom ) : boolean | DOMElement
$item eZ\Publish\Core\FieldType\Page\Parts\Item
$dom DOMDocument
return boolean | DOMElement

generateXmlString() public method

Generates XML string from $page object to be stored in storage engine.
public generateXmlString ( Page $page ) : string
$page eZ\Publish\Core\FieldType\Page\Parts\Page
return string

generateZoneXmlString() protected method

Generates XML string for a given $zone object.
protected generateZoneXmlString ( Zone $zone, DOMDocument $dom ) : DOMElement
$zone eZ\Publish\Core\FieldType\Page\Parts\Zone
$dom DOMDocument
return DOMElement

getIndexColumn() public method

Returns the name of the index column the datatype uses, which is either "sort_key_int" or "sort_key_string". This column is then used for filtering and sorting for this type.
public getIndexColumn ( ) : string
return string

restoreBlockFromXml() protected method

Restores value for a given Block $node.
protected restoreBlockFromXml ( DOMElement $node ) : Block
$node DOMElement
return eZ\Publish\Core\FieldType\Page\Parts\Block

restoreItemFromXml() protected method

Restores value for a given Item $node.
protected restoreItemFromXml ( DOMElement $node ) : Item
$node DOMElement
return eZ\Publish\Core\FieldType\Page\Parts\Item

restoreValueFromXmlString() public method

Restores value from XML string.
public restoreValueFromXmlString ( string $xmlString ) : Page
$xmlString string
return eZ\Publish\Core\FieldType\Page\Parts\Page

restoreZoneFromXml() protected method

Restores value for a given Zone $node.
protected restoreZoneFromXml ( DOMElement $node ) : Zone
$node DOMElement
return eZ\Publish\Core\FieldType\Page\Parts\Zone

toFieldDefinition() public method

Converts field definition data in $storageDef into $fieldDef.
public toFieldDefinition ( StorageFieldDefinition $storageDef, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef )
$storageDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
$fieldDef eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition

toFieldValue() public method

Converts data from $value to $fieldValue.
public toFieldValue ( StorageFieldValue $value, eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue )
$value eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue

toStorageFieldDefinition() public method

Converts field definition data in $fieldDef into $storageFieldDef.
public toStorageFieldDefinition ( eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDef, StorageFieldDefinition $storageDef )
$fieldDef eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$storageDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition

toStorageValue() public method

Converts data from $value to $storageFieldValue.
public toStorageValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $value, StorageFieldValue $storageFieldValue )
$value eZ\Publish\SPI\Persistence\Content\FieldValue
$storageFieldValue eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue