Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

This FieldType validates and stores formatted text.

NameInternal nameExpected input
XmlTextezxmltextmixed

Input expectations

TypeDescriptionExample
stringXML document in the FieldType internal format as a string.

See the example below.

eZ\Publish\Core\FieldType\XmlText\Input
An instance of the class implementing FieldType abstract Input class.See the example below.
eZ\Publish\Core\FieldType\XmlText\Value
An instance of the FieldType Value object.See the example below.

Example of the FieldType's internal format

For XHTML Input

The eZ XML output use <strong> and <em> by default, respecting the semantic XHTML notation.


Input object API

Input object is intended as a vector for different input formats. It should accept input value in a foreign format and convert it to the FieldType's internal format.

It should implement abstract eZ\Publish\Core\FieldType\XmlText\Input class, which defines only one method:

MethodDescription
getInternalRepresentation
The method should return the input value in the internal format.

At the moment there is only one implementation of the Input class, eZ\Publish\Core\FieldType\XmlText\Input\EzXml, which accepts input value in the internal format, and therefore only performs validation of the input value.

Example of using the Input object

Value object API

eZ\Publish\Core\FieldType\XmlText\Value offers following properties:

PropertyTypeDescription
xml
DOMDocument
Internal format value as an instance of DOMDocument.

Validation

Validation of the internal format is performed in the eZ\Publish\Core\FieldType\XmlText\Input\EzXml class.

Settings

Following settings are available:

NameTypeDefault valueDescription

numRows

int10Defines the number of rows for the online editor in the administration interface.

tagPreset

mixedType::TAG_PRESET_DEFAULT

Preset of tags for the online editor in the administration interface.

Tag presets

Following tag presets are available as constants in the eZ\Publish\Core\FieldType\XmlText class:

ConstantDescription
TAG_PRESET_DEFAULT
Default tag preset.
TAG_PRESET_SIMPLE_FORMATTING

Preset of tags for online editor intended for simple formatting options.

Example of using settings in PHP