|
eZ Publish
[4.2]
|
The class eZXMLTextType haneles XML formatted datatypes. More...
Inheritance diagram for eZXMLTextType:
Collaboration diagram for eZXMLTextType:Public Member Functions | |
| batchInitializeObjectAttributeData ($classAttribute) | |
| customObjectAttributeHTTPAction ($http, $action, $contentObjectAttribute, $parameters) | |
| deleteStoredObjectAttribute ($contentObjectAttribute, $version=null) | |
| diff ($old, $new, $options=false) | |
| editTemplate ($contentobjectAttribute) | |
| editTemplateSuffix (&$contentobjectAttribute) | |
| eZXMLTextType () | |
| fetchClassAttributeHTTPInput ($http, $base, $classAttribute) | |
| fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute) | |
| fromString ($contentObjectAttribute, $string) | |
| hasObjectAttributeContent ($contentObjectAttribute) | |
| informationTemplate ($contentobjectAttribute) | |
| informationTemplateSuffix (&$contentobjectAttribute) | |
| initializeClassAttribute ($classAttribute) | |
| initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute) | |
| isIndexable () | |
| isInformationCollector () | |
| metaData ($contentObjectAttribute) | |
| objectAttributeContent ($contentObjectAttribute) | |
| onPublish ($contentObjectAttribute, $object, $publishedNodes) | |
| Method triggered on publish for xml text datatype. | |
| postInitializeObjectAttribute ($objectAttribute, $currentVersion, $originalContentObjectAttribute) | |
| postUnserializeContentObjectAttribute ($package, $objectAttribute) | |
| serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode) | |
| serializeContentObjectAttribute ($package, $objectAttribute) | |
| storeObjectAttribute ($attribute) | |
| supportsBatchInitializeObjectAttribute () | |
| templateList () | |
| title ($contentObjectAttribute, $value=null) | |
| toString ($contentObjectAttribute) | |
| unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode) | |
| unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode) | |
| validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute) | |
| viewTemplate ($contentobjectAttribute) | |
| viewTemplateSuffix (&$contentobjectAttribute) | |
Static Public Member Functions | |
| static | concatTextContent ($node) |
| Recursively drills down in the xml tree in $node and concatenates text content from the DOMNodes with a space in-between to make sure search words from two different lines are merged. | |
| static | domString ($domDocument) |
| static | rawXMLText ($contentObjectAttribute) |
| static | transformLinksToRemoteLinks (DOMNodeList $nodeList) |
| static | transformRemoteLinksToLinks (DOMNodeList $nodeList, $objectAttribute) |
Public Attributes | |
| const | COLS_FIELD = 'data_int1' |
| const | COLS_VARIABLE = '_ezxmltext_cols_' |
| const | DATA_TYPE_STRING = "ezxmltext" |
| const | TAG_PRESET_FIELD = 'data_text2' |
| const | TAG_PRESET_VARIABLE = '_ezxmltext_tagpreset_' |
| const | VERSION_30_TIMESTAMP = 1045487555 |
| const | VERSION_TIMESTAMP = 1045487555 |
The class eZXMLTextType haneles XML formatted datatypes.
The formatted datatypes store the data in XML. A typical example of this is shown below:
<?xml version="1.0" encoding="utf-8" ?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"> <header>This is a level one header</header> <paragraph> This is a <emphasize>block</emphasize> of text. </paragraph> <section> <header class="foo">This is a level two header has classification "foo"</header> <paragraph> This is the second paragraph with <bold class="foo">bold text which has classification "foo"</bold> </paragraph> <header>This is a level two header</header> <paragraph> <line>Paragraph can have table</line> <table class="foo" border='1' width='100%'> <tr> <th class="foo"><paragraph>table header of class "foo"</paragraph></th> <td xhtml:width="66" xhtml:colspan="2" xhtml:rowspan="2"> <paragraph>table cell text</paragraph> </td> </tr> </table> </paragraph> <paragraph> <line>This is the first line with <anchor name="first">anchor</anchor></line> <line>This is the second line with <link target="_self" id="1">link</link></line> <line>This is the third line.</line> </paragraph> <paragraph> <ul class="foo"> <li>List item 1</li> <li>List item 2</li> </ul> </paragraph> <paragraph> <ol> <li>Ordered list item 1</li> <li>ordered list item 2</li> </ol> </paragraph> <paragraph> <line>Paragraph can have both inline custom tag <custom name="myInlineTag">text</custom> and block custom tag</line> <custom name="myBlockTag"> <paragraph> block text </paragraph> </custom> </paragraph> <paragraph> Paragraph can have image object with link <object id="55" size="large" align="center" image:ezurl_id="4" /> </paragraph> <paragraph> You can use literal tag to write html code if you have done some changes in override system. <literal class="html"><font color="red">red text</font></literal> </paragraph> <header>This is a level two header</header> </section> </section>
Definition at line 103 of file ezxmltexttype.php.
| eZXMLTextType::batchInitializeObjectAttributeData | ( | $ | classAttribute | ) |
Reimplemented from eZDataType.
Definition at line 815 of file ezxmltexttype.php.
| static eZXMLTextType::concatTextContent | ( | $ | node | ) | [static] |
Recursively drills down in the xml tree in $node and concatenates text content from the DOMNodes with a space in-between to make sure search words from two different lines are merged.
| DOMNode | $node |
Definition at line 399 of file ezxmltexttype.php.
Referenced by metaData().
| eZXMLTextType::customObjectAttributeHTTPAction | ( | $ | http, |
| $ | action, | ||
| $ | objectAttribute, | ||
| $ | parameters | ||
| ) |
Executes a custom action for an object attribute which was defined on the web page.
Reimplemented from eZDataType.
Definition at line 515 of file ezxmltexttype.php.
| eZXMLTextType::deleteStoredObjectAttribute | ( | $ | contentObjectAttribute, |
| $ | version = null |
||
| ) |
Delete stored object attribute, this will clean up the ezurls and ezobjectlinks
Reimplemented from eZDataType.
Definition at line 753 of file ezxmltexttype.php.
| eZXMLTextType::diff | ( | $ | old, |
| $ | new, | ||
| $ | options = false |
||
| ) |
Method used by content diff system to retrieve changes in attributes. This method implements the default behaviour, which is to show old and new version values of the object.
Reimplemented from eZDataType.
Definition at line 801 of file ezxmltexttype.php.
| static eZXMLTextType::domString | ( | $ | domDocument | ) | [static] |
Definition at line 354 of file ezxmltexttype.php.
Referenced by batchInitializeObjectAttributeData(), initializeObjectAttribute(), postUnserializeContentObjectAttribute(), setEZXMLAttribute(), and eZSimplifiedXMLInput\validateInput().
| eZXMLTextType::editTemplate | ( | $ | contentobjectAttribute | ) |
Reimplemented from eZDataType.
Definition at line 290 of file ezxmltexttype.php.
| eZXMLTextType::editTemplateSuffix | ( | &$ | contentobjectAttribute | ) |
Definition at line 315 of file ezxmltexttype.php.
Referenced by editTemplate().
| eZXMLTextType::eZXMLTextType | ( | ) |
Definition at line 119 of file ezxmltexttype.php.
| eZXMLTextType::fetchClassAttributeHTTPInput | ( | $ | http, |
| $ | base, | ||
| $ | classAttribute | ||
| ) |
Fetches the HTTP input for the content class attribute.
Reimplemented from eZDataType.
Definition at line 232 of file ezxmltexttype.php.
| eZXMLTextType::fetchObjectAttributeHTTPInput | ( | $ | http, |
| $ | base, | ||
| $ | contentObjectAttribute | ||
| ) |
Fetches the http post var string input and stores it in the data instance.
Reimplemented from eZDataType.
Definition at line 253 of file ezxmltexttype.php.
| eZXMLTextType::fromString | ( | $ | contentObjectAttribute, |
| $ | string | ||
| ) |
Reimplemented from eZDataType.
Definition at line 430 of file ezxmltexttype.php.
| eZXMLTextType::hasObjectAttributeContent | ( | $ | contentObjectAttribute | ) |
true if the datatype finds any content in the attribute $contentObjectAttribute. Reimplemented from eZDataType.
Definition at line 472 of file ezxmltexttype.php.
| eZXMLTextType::informationTemplate | ( | $ | contentobjectAttribute | ) |
Reimplemented from eZDataType.
Definition at line 299 of file ezxmltexttype.php.
| eZXMLTextType::informationTemplateSuffix | ( | &$ | contentobjectAttribute | ) |
Definition at line 322 of file ezxmltexttype.php.
Referenced by informationTemplate().
| eZXMLTextType::initializeClassAttribute | ( | $ | classAttribute | ) |
Set class attribute value for template version
Reimplemented from eZDataType.
Definition at line 128 of file ezxmltexttype.php.
| eZXMLTextType::initializeObjectAttribute | ( | $ | contentObjectAttribute, |
| $ | currentVersion, | ||
| $ | originalContentObjectAttribute | ||
| ) |
Sets the default value.
Reimplemented from eZDataType.
Definition at line 138 of file ezxmltexttype.php.
| eZXMLTextType::isIndexable | ( | ) |
Reimplemented from eZDataType.
Definition at line 481 of file ezxmltexttype.php.
| eZXMLTextType::isInformationCollector | ( | ) |
Reimplemented from eZDataType.
Definition at line 486 of file ezxmltexttype.php.
| eZXMLTextType::metaData | ( | $ | contentObjectAttribute | ) |
Returns the meta data used for storing search indeces.
Reimplemented from eZDataType.
Definition at line 371 of file ezxmltexttype.php.
| eZXMLTextType::objectAttributeContent | ( | $ | contentObjectAttribute | ) |
Returns the content.
Reimplemented from eZDataType.
Definition at line 362 of file ezxmltexttype.php.
Referenced by customObjectAttributeHTTPAction(), editTemplateSuffix(), hasObjectAttributeContent(), informationTemplateSuffix(), validateObjectAttributeHTTPInput(), and viewTemplateSuffix().
| eZXMLTextType::onPublish | ( | $ | contentObjectAttribute, |
| $ | object, | ||
| $ | publishedNodes | ||
| ) |
Method triggered on publish for xml text datatype.
This method makes sure that links from all translations of an xml text are registered in the ezurl_object_link table, and thus retained, if previous versions of an object are removed.
| eZContentObjectAttribute | $contentObjectAttribute | |
| eZContentObject | $object | |
| array | $publishedNodes |
Reimplemented from eZDataType.
Definition at line 166 of file ezxmltexttype.php.
| eZXMLTextType::postInitializeObjectAttribute | ( | $ | objectAttribute, |
| $ | currentVersion, | ||
| $ | originalContentObjectAttribute | ||
| ) |
Initializes the object attribute with some data after object attribute is already stored. It means that for initial version you allready have an attribute_id and you can store data somewhere using this id.
Reimplemented from eZDataType.
Definition at line 267 of file ezxmltexttype.php.
| eZXMLTextType::postUnserializeContentObjectAttribute | ( | $ | package, |
| $ | objectAttribute | ||
| ) |
Reimplemented from eZDataType.
Definition at line 654 of file ezxmltexttype.php.
| static eZXMLTextType::rawXMLText | ( | $ | contentObjectAttribute | ) | [static] |
Definition at line 334 of file ezxmltexttype.php.
Referenced by initializeObjectAttribute(), metaData(), objectAttributeContent(), onPublish(), ezpUrlObjectLinkUpdate\processData(), and title().
| eZXMLTextType::serializeContentClassAttribute | ( | $ | classAttribute, |
| $ | attributeNode, | ||
| $ | attributeParametersNode | ||
| ) |
Adds the necessary dom structure to the attribute parameters.
Reimplemented from eZDataType.
Definition at line 500 of file ezxmltexttype.php.
| eZXMLTextType::serializeContentObjectAttribute | ( | $ | package, |
| $ | objectAttribute | ||
| ) |
Reimplemented from eZDataType.
Definition at line 525 of file ezxmltexttype.php.
| eZXMLTextType::storeObjectAttribute | ( | $ | attribute | ) |
| eZXMLTextType::supportsBatchInitializeObjectAttribute | ( | ) |
Reimplemented from eZDataType.
Definition at line 810 of file ezxmltexttype.php.
| eZXMLTextType::templateList | ( | ) |
Makes sure content/datatype/.../ezxmltags/... are included.
Reimplemented from eZDataType.
Definition at line 494 of file ezxmltexttype.php.
| eZXMLTextType::title | ( | $ | contentObjectAttribute, |
| $ | value = null |
||
| ) |
| eZXMLTextType::toString | ( | $ | contentObjectAttribute | ) |
Reimplemented from eZDataType.
Definition at line 425 of file ezxmltexttype.php.
| static eZXMLTextType::transformLinksToRemoteLinks | ( | DOMNodeList $ | nodeList | ) | [static] |
Definition at line 558 of file ezxmltexttype.php.
Referenced by serializeContentObjectAttribute().
| static eZXMLTextType::transformRemoteLinksToLinks | ( | DOMNodeList $ | nodeList, |
| $ | objectAttribute | ||
| ) | [static] |
Definition at line 687 of file ezxmltexttype.php.
Referenced by postUnserializeContentObjectAttribute().
| eZXMLTextType::unserializeContentClassAttribute | ( | $ | classAttribute, |
| $ | attributeNode, | ||
| $ | attributeParametersNode | ||
| ) |
Extracts values from the attribute parameters and sets it in the class attribute.
Reimplemented from eZDataType.
Definition at line 509 of file ezxmltexttype.php.
| eZXMLTextType::unserializeContentObjectAttribute | ( | $ | package, |
| $ | objectAttribute, | ||
| $ | attributeNode | ||
| ) |
| contentobject | attribute object |
| domnode | object |
Reimplemented from eZDataType.
Definition at line 611 of file ezxmltexttype.php.
| eZXMLTextType::validateObjectAttributeHTTPInput | ( | $ | http, |
| $ | base, | ||
| $ | contentObjectAttribute | ||
| ) |
Validates the input and returns true if the input was valid for this datatype.
Get object for input validation
Reimplemented from eZDataType.
Definition at line 221 of file ezxmltexttype.php.
| eZXMLTextType::viewTemplate | ( | $ | contentobjectAttribute | ) |
Reimplemented from eZDataType.
Definition at line 279 of file ezxmltexttype.php.
| eZXMLTextType::viewTemplateSuffix | ( | &$ | contentobjectAttribute | ) |
Definition at line 308 of file ezxmltexttype.php.
Referenced by viewTemplate().
| const eZXMLTextType::COLS_FIELD = 'data_int1' |
Definition at line 106 of file ezxmltexttype.php.
| const eZXMLTextType::COLS_VARIABLE = '_ezxmltext_cols_' |
Definition at line 107 of file ezxmltexttype.php.
| const eZXMLTextType::DATA_TYPE_STRING = "ezxmltext" |
Definition at line 105 of file ezxmltexttype.php.
| const eZXMLTextType::TAG_PRESET_FIELD = 'data_text2' |
Definition at line 110 of file ezxmltexttype.php.
| const eZXMLTextType::TAG_PRESET_VARIABLE = '_ezxmltext_tagpreset_' |
Definition at line 111 of file ezxmltexttype.php.
| const eZXMLTextType::VERSION_30_TIMESTAMP = 1045487555 |
Definition at line 114 of file ezxmltexttype.php.
Referenced by rawXMLText().
| const eZXMLTextType::VERSION_TIMESTAMP = 1045487555 |
Definition at line 117 of file ezxmltexttype.php.