Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezxmltexttype.php
Go to the documentation of this file.
1 <?php
82 class eZXMLTextType extends eZDataType
83 {
84 const DATA_TYPE_STRING = "ezxmltext";
85 const COLS_FIELD = 'data_int1';
86 const COLS_VARIABLE = '_ezxmltext_cols_';
87
88 // Tag support preset
89 const TAG_PRESET_FIELD = 'data_text2';
90 const TAG_PRESET_VARIABLE = '_ezxmltext_tagpreset_';
91
92 // The timestamp of the format for eZ Publish 3.0.
93 const VERSION_30_TIMESTAMP = 1045487555;
94 // Contains the timestamp of the current xml format, if the stored
95 // timestamp is less than this it needs to be upgraded until it is correct.
96 const VERSION_TIMESTAMP = 1045487555; // AS 21-09-2007: should be the same as VERSION_30_TIMESTAMP
97
98 public function __construct()
99 {
100 parent::__construct( self::DATA_TYPE_STRING, ezpI18n::tr( 'kernel/classes/datatypes', "XML block", 'Datatype name' ),
101 array( 'serialize_supported' => true ) );
102 $this->deletedStoredObjectAttribute = array();
103 }
104
108 function initializeClassAttribute( $classAttribute )
109 {
110 if ( $classAttribute->attribute( self::COLS_FIELD ) == null )
111 $classAttribute->setAttribute( self::COLS_FIELD, 10 );
112 $classAttribute->store();
113 }
114
118 function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
119 {
120 if ( $currentVersion != false )
121 {
122 $xmlText = eZXMLTextType::rawXMLText( $originalContentObjectAttribute );
123 $contentObjectAttribute->setAttribute( "data_text", $xmlText );
124 }
125 else
126 {
127 $parser = new eZXMLInputParser();
128 $doc = $parser->createRootNode();
129 $xmlText = eZXMLTextType::domString( $doc );
130 $contentObjectAttribute->setAttribute( "data_text", $xmlText );
131 }
132 }
133
149 function onPublish( $contentObjectAttribute, $object, $publishedNodes )
150 {
151 $currentVersion = $object->currentVersion();
152 $langMask = $currentVersion->attribute( 'language_mask' );
153
154 // We find all translations present in the current version. We calculate
155 // this from the language mask already present in the fetched version,
156 // so no further round-trip to the DB is required.
157 $languageList = eZContentLanguage::decodeLanguageMask( $langMask, true );
158 $languageList = $languageList['language_list'];
159
160 // We want to have the class attribute identifier of the attribute
161 // containing the current ezxmltext, as we then can use the more efficient
162 // eZContentObject->fetchAttributesByIdentifier() to get the data
163 $identifier = $contentObjectAttribute->attribute( 'contentclass_attribute_identifier' );
164
165 $attributeArray = $object->fetchAttributesByIdentifier( array( $identifier ),
166 $currentVersion->attribute( 'version' ),
167 $languageList );
168
169 foreach ( $attributeArray as $attribute )
170 {
171 $xmlText = eZXMLTextType::rawXMLText( $attribute );
172
173 $dom = new DOMDocument( '1.0', 'utf-8' );
174 if ( empty( $xmlText ) || !$dom->loadXML( $xmlText ) )
175 continue;
176
177 // urls
178 $urlIdArray = array();
179 foreach ( $dom->getElementsByTagName( 'link' ) as $link )
180 {
181 // We are looking for external 'http://'-style links, not the internal
182 // object or node links.
183 if ( $link->hasAttribute( 'url_id' ) )
184 {
185 $urlIdArray[] = $link->getAttribute( 'url_id' );
186 }
187 }
188 $urlIdArray = array_unique( $urlIdArray );
189
190 $db = eZDB::instance();
191 $db->begin();
192 eZSimplifiedXMLInput::updateUrlObjectLinks( $attribute, $urlIdArray );
193 $db->commit();
194
195 // linked objects
196 $linkedObjectIdArray = $this->getRelatedObjectList( $dom->getElementsByTagName( 'link' ) );
197
198 // embedded objects
199 $embeddedObjectIdArray = array_merge(
200 $this->getRelatedObjectList( $dom->getElementsByTagName( 'embed' ) ),
201 $this->getRelatedObjectList( $dom->getElementsByTagName( 'embed-inline' ) )
202 );
203
204 if ( !empty( $embeddedObjectIdArray ) )
205 {
206 $object->appendInputRelationList( $embeddedObjectIdArray, eZContentObject::RELATION_EMBED );
207 }
208
209 if ( !empty( $linkedObjectIdArray ) )
210 {
211 $object->appendInputRelationList( $linkedObjectIdArray, eZContentObject::RELATION_LINK );
212 }
213 if ( !empty( $linkedObjectIdArray ) || !empty( $embeddedObjectIdArray ) )
214 {
215 $object->commitInputRelations( $currentVersion->attribute( 'version' ) );
216 }
217
218 }
219 }
220
226 private function getRelatedObjectList( DOMNodeList $domNodeList )
227 {
228 $embeddedObjectIdArray = array();
229 foreach( $domNodeList as $embed )
230 {
231 if ( $embed->hasAttribute( 'object_id' ) )
232 {
233 $embeddedObjectIdArray[] = $embed->getAttribute( 'object_id' );
234 }
235 elseif ( $embed->hasAttribute( 'node_id' ) )
236 {
237 if ( $object = eZContentObject::fetchByNodeID( $embed->getAttribute( 'node_id' ) ) )
238 {
239 $embeddedObjectIdArray[] = $object->attribute( 'id' );
240 }
241 }
242 }
243 return $embeddedObjectIdArray;
244 }
245
250 function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
251 {
253 // To do: only validate, not save data
254 $xmlText = $this->objectAttributeContent( $contentObjectAttribute );
255 $input = $xmlText->attribute( 'input' );
256 $isValid = $input->validateInput( $http, $base, $contentObjectAttribute );
257
258 return $isValid;
259 }
260
261 function fetchClassAttributeHTTPInput( $http, $base, $classAttribute )
262 {
263 $column = $base . self::COLS_VARIABLE . $classAttribute->attribute( 'id' );
264 $tagPreset = $base . self::TAG_PRESET_VARIABLE . $classAttribute->attribute( 'id' );
265 if ( $http->hasPostVariable( $column ) )
266 {
267 $columnValue = $http->postVariable( $column );
268 $classAttribute->setAttribute( self::COLS_FIELD, $columnValue );
269 if ( $http->hasPostVariable( $tagPreset ) )
270 {
271 $tagPresetValue = $http->postVariable( $tagPreset );
272 $classAttribute->setAttribute( self::TAG_PRESET_FIELD, $tagPresetValue );
273 }
274 return true;
275 }
276 return false;
277 }
278
282 function fetchObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
283 {
284 // To do: Data should be saved here.
285 /*$xmlText = $this->objectAttributeContent( $contentObjectAttribute );
286 $input = $xmlText->attribute( 'input' );
287 $isValid = $input->validateInput( $http, $base, $contentObjectAttribute );*/
288 return true;
289 }
290
296 function postInitializeObjectAttribute( $objectAttribute, $currentVersion, $originalContentObjectAttribute )
297 {
298 }
299
303 function storeObjectAttribute( $attribute )
304 {
305 $attribute->setAttribute( 'data_int', self::VERSION_TIMESTAMP );
306 }
307
308 function viewTemplate( $contentobjectAttribute )
309 {
310 $template = $this->DataTypeString;
311 $suffix = $this->viewTemplateSuffix( $contentobjectAttribute );
312 if ( $suffix )
313 {
314 $template .= '_' . $suffix;
315 }
316 return $template;
317 }
318
319 function editTemplate( $contentobjectAttribute )
320 {
321 $template = $this->DataTypeString;
322 $suffix = $this->editTemplateSuffix( $contentobjectAttribute );
323 if ( $suffix )
324 $template .= '_' . $suffix;
325 return $template;
326 }
327
328 function informationTemplate( $contentobjectAttribute )
329 {
330 $template = $this->DataTypeString;
331 $suffix = $this->informationTemplateSuffix( $contentobjectAttribute );
332 if ( $suffix )
333 $template .= '_' . $suffix;
334 return $template;
335 }
336
337 function viewTemplateSuffix( &$contentobjectAttribute )
338 {
339 $content = $this->objectAttributeContent( $contentobjectAttribute );
340 $outputHandler = $content->attribute( 'output' );
341 return $outputHandler->viewTemplateSuffix( $contentobjectAttribute );
342 }
343
344 function editTemplateSuffix( &$contentobjectAttribute )
345 {
346 $content = $this->objectAttributeContent( $contentobjectAttribute );
347 $inputHandler = $content->attribute( 'input' );
348 return $inputHandler->editTemplateSuffix( $contentobjectAttribute );
349 }
350
351 function informationTemplateSuffix( &$contentobjectAttribute )
352 {
353 $content = $this->objectAttributeContent( $contentobjectAttribute );
354 $inputHandler = $content->attribute( 'input' );
355 return $inputHandler->informationTemplateSuffix( $contentobjectAttribute );
356 }
357
363 static function rawXMLText( $contentObjectAttribute )
364 {
365 $text = $contentObjectAttribute->attribute( 'data_text' );
366 $timestamp = $contentObjectAttribute->attribute( 'data_int' );
367 if ( $timestamp < self::VERSION_30_TIMESTAMP )
368 {
369 $charset = 'UTF-8';
370 $codec = eZTextCodec::instance( false, $charset );
371 $text = $codec->convertString( $text );
372 $timestamp = self::VERSION_30_TIMESTAMP;
373 }
374 return $text;
375 }
376
383 static function domString( $domDocument )
384 {
385 return $domDocument->saveXML();
386 }
387
391 function objectAttributeContent( $contentObjectAttribute )
392 {
393 $xmlText = new eZXMLText( eZXMLTextType::rawXMLText( $contentObjectAttribute ), $contentObjectAttribute );
394 return $xmlText;
395 }
396
400 function metaData( $contentObjectAttribute )
401 {
402 $metaData = "";
403
404 $dom = new DOMDocument( '1.0', 'utf-8' );
405 $text = eZXMLTextType::rawXMLText( $contentObjectAttribute );
406 if ( trim( $text ) == '' )
407 {
408 return $metaData;
409 }
410 $success = $dom->loadXML( $text );
411
412 if ( $success )
413 {
414 $metaData = trim( eZXMLTextType::concatTextContent( $dom->documentElement ) );
415 }
416 return $metaData;
417 }
418
428 static function concatTextContent( $node )
429 {
430 $retString = '';
431 if ( !( $node instanceof DOMNode ) )
432 {
433 return $retString;
434 }
435 if ( $node->hasChildNodes() )
436 {
437 $childArray = $node->childNodes;
438 foreach ( $childArray as $child )
439 {
440 $retString .= eZXMLTextType::concatTextContent( $child );
441 }
442 }
443 elseif ( $node->nodeType === XML_TEXT_NODE )
444 {
445 return $node->textContent . ' ';
446 }
447 return $retString;
448 }
449
454 function toString( $contentObjectAttribute )
455 {
456 return $contentObjectAttribute->attribute( 'data_text' );
457 }
458
459 function fromString( $contentObjectAttribute, $string )
460 {
461 return $contentObjectAttribute->setAttribute( 'data_text', $string );
462 }
463
464
468 function title( $contentObjectAttribute, $value = null )
469 {
470 $text = eZXMLTextType::rawXMLText( $contentObjectAttribute );
471
472 $dom = new DOMDocument( '1.0', 'utf-8' );
473 $success = $dom->loadXML( $text );
474
475 // Get first text element of xml
476 if ( !$success )
477 {
478 return $text;
479 }
480
481 $root = $dom->documentElement;
482 $section = $root->firstChild;
483 $textDom = false;
484 if ( $section )
485 {
486 $textDom = $section->firstChild;
487 }
488
489 if ( $textDom && $textDom->hasChildNodes() )
490 {
491 $text = $textDom->firstChild->textContent;
492 }
493 elseif ( $textDom )
494 {
495 $text = $textDom->textContent;
496 }
497
498 return $text;
499 }
500
501 function hasObjectAttributeContent( $contentObjectAttribute )
502 {
503 $content = $this->objectAttributeContent( $contentObjectAttribute );
504 if ( is_object( $content ) and
505 !$content->attribute( 'is_empty' ) )
506 return true;
507 return false;
508 }
509
510 function isIndexable()
511 {
512 return true;
513 }
514
515 function isInformationCollector()
516 {
517 return false;
518 }
519
523 function templateList()
524 {
525 return array( array( 'regexp',
526 '#^content/datatype/[a-zA-Z]+/ezxmltags/#' ) );
527 }
528
529 function serializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode )
530 {
531 $textColumns = $classAttribute->attribute( self::COLS_FIELD );
532 $dom = $attributeParametersNode->ownerDocument;
533 $textColumnCountNode = $dom->createElement( 'text-column-count' );
534 $textColumnCountNode->appendChild( $dom->createTextNode( $textColumns ) );
535 $attributeParametersNode->appendChild( $textColumnCountNode );
536 }
537
538 function unserializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode )
539 {
540 $textColumns = $attributeParametersNode->getElementsByTagName( 'text-column-count' )->item( 0 )->textContent;
541 $classAttribute->setAttribute( self::COLS_FIELD, $textColumns );
542 }
543
544 function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribute, $parameters )
545 {
546 $content = $this->objectAttributeContent( $contentObjectAttribute );
547 $inputHandler = $content->attribute( 'input' );
548 $inputHandler->customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribute );
549 }
550
554 function serializeContentObjectAttribute( $package, $objectAttribute )
555 {
556
557 $DOMNode = $this->createContentObjectAttributeDOMNode( $objectAttribute );
558 $xmlString = $objectAttribute->attribute( 'data_text' );
559
560 if ( $xmlString != '' )
561 {
562 $doc = new DOMDocument( '1.0', 'utf-8' );
563 $success = $doc->loadXML( $xmlString );
564
565 /* For all links found in the XML, do the following:
566 * - add "href" attribute fetching it from ezurl table.
567 * - remove "id" attribute.
568 */
569
570 $links = $doc->getElementsByTagName( 'link' );
571 $embeds = $doc->getElementsByTagName( 'embed' );
572 $objects = $doc->getElementsByTagName( 'object' );
573 $embedsInline = $doc->getElementsByTagName( 'embed-inline' );
574
575 eZXMLTextType::transformLinksToRemoteLinks( $links );
576 eZXMLTextType::transformLinksToRemoteLinks( $embeds );
577 eZXMLTextType::transformLinksToRemoteLinks( $objects );
578 eZXMLTextType::transformLinksToRemoteLinks( $embedsInline );
579
580 $importedRootNode = $DOMNode->ownerDocument->importNode( $doc->documentElement, true );
581 $DOMNode->appendChild( $importedRootNode );
582 }
583
584 return $DOMNode;
585 }
586
587 static function transformLinksToRemoteLinks( DOMNodeList $nodeList )
588 {
589 foreach ( $nodeList as $node )
590 {
591 $linkID = $node->getAttribute( 'url_id' );
592 $isObject = ( $node->localName == 'object' );
593 $objectID = $isObject ? $node->getAttribute( 'id' ) : $node->getAttribute( 'object_id' );
594 $nodeID = $node->getAttribute( 'node_id' );
595
596 if ( $linkID )
597 {
598 $urlObj = eZURL::fetch( $linkID );
599 if ( !$urlObj ) // an error occured
600 {
601 continue;
602 }
603 $url = $urlObj->attribute( 'url' );
604 $node->setAttribute( 'href', $url );
605 $node->removeAttribute( 'url_id' );
606 }
607 elseif ( $objectID )
608 {
609 $object = eZContentObject::fetch( $objectID, false );
610 if ( is_array( $object ) )
611 {
612 $node->setAttribute( 'object_remote_id', $object['remote_id'] );
613 }
614
615 if ( $isObject )
616 {
617 $node->removeAttribute( 'id' );
618 }
619 else
620 {
621 $node->removeAttribute( 'object_id' );
622 }
623 }
624 elseif ( $nodeID )
625 {
626 $nodeData = eZContentObjectTreeNode::fetch( $nodeID, false, false );
627 if ( is_array( $nodeData ) )
628 {
629 $node->setAttribute( 'node_remote_id', $nodeData['remote_id'] );
630 }
631 $node->removeAttribute( 'node_id' );
632 }
633 }
634 }
635
640 function unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode )
641 {
642 /* For all links found in the XML, do the following:
643 * Search for url specified in 'href' link attribute (in ezurl table).
644 * If the url not found then create a new one.
645 * Then associate the found (or created) URL with the object attribute by creating new url-object link.
646 * After that, remove "href" attribute, add new "id" attribute.
647 * This new 'id' will always refer to the existing url object.
648 */
649 $linkNodes = $attributeNode->getElementsByTagName( 'link' );
650
651 foreach ( $linkNodes as $linkNode )
652 {
653 $href = $linkNode->getAttribute( 'href' );
654 if ( !$href )
655 continue;
656 $urlObj = eZURL::urlByURL( $href );
657
658 if ( !$urlObj )
659 {
660 $urlObj = eZURL::create( $href );
661 $urlObj->store();
662 }
663
664 $linkNode->removeAttribute( 'href' );
665 $linkNode->setAttribute( 'url_id', $urlObj->attribute( 'id' ) );
666 $urlObjectLink = eZURLObjectLink::create( $urlObj->attribute( 'id' ),
667 $objectAttribute->attribute( 'id' ),
668 $objectAttribute->attribute( 'version' ) );
669 $urlObjectLink->store();
670 }
671
672 foreach ( $attributeNode->childNodes as $childNode )
673 {
674 if ( $childNode->nodeType == XML_ELEMENT_NODE )
675 {
676 $xmlString = $childNode->ownerDocument->saveXML( $childNode );
677 $objectAttribute->setAttribute( 'data_text', $xmlString );
678 break;
679 }
680 }
681 }
682
683 function postUnserializeContentObjectAttribute( $package, $objectAttribute )
684 {
685 $xmlString = $objectAttribute->attribute( 'data_text' );
686 $doc = new DOMDocument( '1.0', 'utf-8' );
687 $success = $doc->loadXML( $xmlString );
688
689 if ( !$success )
690 {
691 return false;
692 }
693
694 $links = $doc->getElementsByTagName( 'link' );
695 $objects = $doc->getElementsByTagName( 'object' );
696 $embeds = $doc->getElementsByTagName( 'embed' );
697 $embedsInline = $doc->getElementsByTagName( 'embed-inline' );
698
699 $modified = array();
700 $modified[] = eZXMLTextType::transformRemoteLinksToLinks( $links, $objectAttribute );
701 $modified[] = eZXMLTextType::transformRemoteLinksToLinks( $objects, $objectAttribute );
702 $modified[] = eZXMLTextType::transformRemoteLinksToLinks( $embeds, $objectAttribute );
703 $modified[] = eZXMLTextType::transformRemoteLinksToLinks( $embedsInline, $objectAttribute );
704
705 if ( in_array( true, $modified ) )
706 {
707 $objectAttribute->setAttribute( 'data_text', eZXMLTextType::domString( $doc ) );
708 return true;
709 }
710 else
711 {
712 return false;
713 }
714 }
715
716 static function transformRemoteLinksToLinks( DOMNodeList $nodeList, $objectAttribute )
717 {
718 $modified = false;
719
720 $contentObject = $objectAttribute->attribute( 'object' );
721 foreach ( $nodeList as $node )
722 {
723 $objectRemoteID = $node->getAttribute( 'object_remote_id' );
724 $nodeRemoteID = $node->getAttribute( 'node_remote_id' );
725 if ( $objectRemoteID )
726 {
727 $objectArray = eZContentObject::fetchByRemoteID( $objectRemoteID, false );
728 if ( !is_array( $objectArray ) )
729 {
730 eZDebug::writeWarning( "Can't fetch object with remoteID = $objectRemoteID", __METHOD__ );
731 continue;
732 }
733
734 $objectID = $objectArray['id'];
735 if ( $node->localName == 'object' )
736 $node->setAttribute( 'id', $objectID );
737 else
738 $node->setAttribute( 'object_id', $objectID );
739 $node->removeAttribute( 'object_remote_id' );
740 $modified = true;
741
742 // add as related object
743 if ( $contentObject )
744 {
745 $relationType = $node->localName == 'link' ? eZContentObject::RELATION_LINK : eZContentObject::RELATION_EMBED;
746 $contentObject->addContentObjectRelation( $objectID, $objectAttribute->attribute( 'version' ), 0, $relationType );
747 }
748 }
749 elseif ( $nodeRemoteID )
750 {
751 $nodeArray = eZContentObjectTreeNode::fetchByRemoteID( $nodeRemoteID, false );
752 if ( !is_array( $nodeArray ) )
753 {
754 eZDebug::writeWarning( "Can't fetch node with remoteID = $nodeRemoteID", __METHOD__ );
755 continue;
756 }
757
758 $node->setAttribute( 'node_id', $nodeArray['node_id'] );
759 $node->removeAttribute( 'node_remote_id' );
760 $modified = true;
761
762 // add as related object
763 if ( $contentObject )
764 {
765 $relationType = $node->nodeName == 'link' ? eZContentObject::RELATION_LINK : eZContentObject::RELATION_EMBED;
766 $contentObject->addContentObjectRelation( $nodeArray['id'], $objectAttribute->attribute( 'version' ), 0, $relationType );
767 }
768 }
769 }
770
771 return $modified;
772 }
773
777 function deleteStoredObjectAttribute( $contentObjectAttribute, $version = null )
778 {
779 $contentObjectAttributeID = $contentObjectAttribute->attribute( "id" );
780
781 if ( isset( $this->deletedStoredObjectAttribute[ $contentObjectAttributeID ] ) )
782 return;
783
784 $db = eZDB::instance();
785
786 /* First we remove the link between the keyword and the object
787 * attribute to be removed */
788 if ( $version == null )
789 {
790 eZPersistentObject::removeObject( eZURLObjectLink::definition(),
791 array( 'contentobject_attribute_id' => $contentObjectAttributeID ) );
792
793 }
794 else
795 {
796 eZPersistentObject::removeObject( eZURLObjectLink::definition(),
797 array( 'contentobject_attribute_id' => $contentObjectAttributeID,
798 'contentobject_attribute_version' => $version ) );
799 }
800
801 /* Here we figure out which which URLs are not in use at all */
802 if ( $db->databaseName() == 'oracle' )
803 {
804 $res = $db->arrayQuery( "SELECT DISTINCT id
805 FROM ezurl, ezurl_object_link
806 WHERE ezurl.id = ezurl_object_link.url_id(+)
807 AND url_id IS NULL" );
808 }
809 else
810 {
811 $res = $db->arrayQuery(" SELECT DISTINCT id
812 FROM ezurl LEFT JOIN ezurl_object_link ON (ezurl.id = ezurl_object_link.url_id)
813 WHERE url_id IS NULL" );
814 }
815
816 /* And if there are some, we delete them */
817 if ( count( $res ) )
818 {
819 $unusedUrlIDs = array();
820 foreach ( $res as $record )
821 $unusedUrlIDs[] = $record['id'];
822 $unusedUrlIDString = implode( ', ', $unusedUrlIDs );
823
824 $db->query( "DELETE FROM ezurl WHERE id IN ($unusedUrlIDString)" );
825 }
826
827 /* If all the versions/urls of the attribute were removed, do not try to remove them again */
828 if ( $version == null )
829 {
830 $this->deletedStoredObjectAttribute[ $contentObjectAttributeID ] = true;
831 }
832 }
833
834 function diff( $old, $new, $options = false )
835 {
836 $diff = new eZDiff();
837 $diff->setDiffEngineType( $diff->engineType( 'xml' ) );
838 $diff->initDiffEngine();
839 $diffObject = $diff->diff( $old, $new );
840 return $diffObject;
841 }
842
843 function supportsBatchInitializeObjectAttribute()
844 {
845 return true;
846 }
847
848 function batchInitializeObjectAttributeData( $classAttribute )
849 {
850 $parser = new eZXMLInputParser();
851 $doc = $parser->createRootNode();
852 $xmlText = eZXMLTextType::domString( $doc );
853 $db = eZDB::instance();
854 $xmlText = "'" . $db->escapeString( $xmlText ) . "'";
855 return array( 'data_text' => $xmlText );
856 }
857
862 protected $deletedStoredObjectAttribute;
863 }
864
865 eZDataType::register( eZXMLTextType::DATA_TYPE_STRING, "eZXMLTextType" );
866
867 ?>
eZContentLanguage\decodeLanguageMask
static decodeLanguageMask( $langMask, $returnLanguageLocale=false)
Definition: ezcontentlanguage.php:588
eZContentObjectTreeNode\fetchByRemoteID
static fetchByRemoteID( $remoteID, $asObject=true)
Definition: ezcontentobjecttreenode.php:2933
eZContentObjectTreeNode\fetch
static fetch( $nodeID=false, $lang=false, $asObject=true, $conditions=false)
Definition: ezcontentobjecttreenode.php:3058
eZContentObject\RELATION_LINK
const RELATION_LINK
Definition: ezcontentobject.php:39
eZContentObject\fetch
static fetch( $id, $asObject=true)
Definition: ezcontentobject.php:885
eZContentObject\fetchByNodeID
static fetchByNodeID( $nodeID, $asObject=true)
Definition: ezcontentobject.php:1072
eZContentObject\fetchByRemoteID
static fetchByRemoteID( $remoteID, $asObject=true)
Definition: ezcontentobject.php:865
eZContentObject\RELATION_EMBED
const RELATION_EMBED
Definition: ezcontentobject.php:38
eZDB\instance
static instance( $databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Definition: ezdb.php:117
eZDataType
Base class for content datatypes.
Definition: ezdatatype.php:46
eZDataType\register
static register( $dataTypeString, $className)
Definition: ezdatatype.php:203
eZDataType\$DataTypeString
$DataTypeString
The datatype string ID, used for uniquely identifying a datatype.
Definition: ezdatatype.php:1515
eZDataType\createContentObjectAttributeDOMNode
createContentObjectAttributeDOMNode( $objectAttribute)
Definition: ezdatatype.php:1371
eZDebug\writeWarning
static writeWarning( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:502
eZPersistentObject\removeObject
static removeObject( $def, $conditions=null, $extraConditions=null)
Definition: ezpersistentobject.php:271
eZSimplifiedXMLInput\updateUrlObjectLinks
static updateUrlObjectLinks( $contentObjectAttribute, $urlIDArray)
Definition: ezsimplifiedxmlinput.php:26
eZTextCodec\instance
static instance( $inputCharsetCode, $outputCharsetCode=false, $alwaysReturn=true)
Definition: eztextcodec.php:446
eZURLObjectLink\create
static create( $urlID, $contentObjectAttributeID, $contentObjectAttributeVersion)
Definition: ezurlobjectlink.php:51
eZURLObjectLink\definition
static definition()
Definition: ezurlobjectlink.php:20
eZURL\fetch
static fetch( $id, $asObject=true)
Definition: ezurl.php:211
eZURL\urlByURL
static urlByURL( $urlText)
Definition: ezurl.php:426
eZURL\create
static create( $url)
Definition: ezurl.php:66
eZXMLInputParser
Definition: ezxmlinputparser.php:25
eZXMLTextType
The class eZXMLTextType haneles XML formatted datatypes.
Definition: ezxmltexttype.php:83
eZXMLTextType\supportsBatchInitializeObjectAttribute
supportsBatchInitializeObjectAttribute()
Definition: ezxmltexttype.php:843
eZXMLTextType\isIndexable
isIndexable()
Definition: ezxmltexttype.php:510
eZXMLTextType\initializeObjectAttribute
initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
Definition: ezxmltexttype.php:118
eZXMLTextType\getRelatedObjectList
getRelatedObjectList(DOMNodeList $domNodeList)
Definition: ezxmltexttype.php:226
eZXMLTextType\TAG_PRESET_VARIABLE
const TAG_PRESET_VARIABLE
Definition: ezxmltexttype.php:90
eZXMLTextType\VERSION_TIMESTAMP
const VERSION_TIMESTAMP
Definition: ezxmltexttype.php:96
eZXMLTextType\postUnserializeContentObjectAttribute
postUnserializeContentObjectAttribute( $package, $objectAttribute)
Definition: ezxmltexttype.php:683
eZXMLTextType\onPublish
onPublish( $contentObjectAttribute, $object, $publishedNodes)
Definition: ezxmltexttype.php:149
eZXMLTextType\TAG_PRESET_FIELD
const TAG_PRESET_FIELD
Definition: ezxmltexttype.php:89
eZXMLTextType\viewTemplateSuffix
viewTemplateSuffix(&$contentobjectAttribute)
Definition: ezxmltexttype.php:337
eZXMLTextType\fetchObjectAttributeHTTPInput
fetchObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute)
Definition: ezxmltexttype.php:282
eZXMLTextType\informationTemplateSuffix
informationTemplateSuffix(&$contentobjectAttribute)
Definition: ezxmltexttype.php:351
eZXMLTextType\editTemplate
editTemplate( $contentobjectAttribute)
Definition: ezxmltexttype.php:319
eZXMLTextType\diff
diff( $old, $new, $options=false)
Definition: ezxmltexttype.php:834
eZXMLTextType\informationTemplate
informationTemplate( $contentobjectAttribute)
Definition: ezxmltexttype.php:328
eZXMLTextType\unserializeContentClassAttribute
unserializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode)
Definition: ezxmltexttype.php:538
eZXMLTextType\title
title( $contentObjectAttribute, $value=null)
Definition: ezxmltexttype.php:468
eZXMLTextType\transformRemoteLinksToLinks
static transformRemoteLinksToLinks(DOMNodeList $nodeList, $objectAttribute)
Definition: ezxmltexttype.php:716
eZXMLTextType\metaData
metaData( $contentObjectAttribute)
Definition: ezxmltexttype.php:400
eZXMLTextType\serializeContentClassAttribute
serializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode)
Definition: ezxmltexttype.php:529
eZXMLTextType\fromString
fromString( $contentObjectAttribute, $string)
Definition: ezxmltexttype.php:459
eZXMLTextType\transformLinksToRemoteLinks
static transformLinksToRemoteLinks(DOMNodeList $nodeList)
Definition: ezxmltexttype.php:587
eZXMLTextType\VERSION_30_TIMESTAMP
const VERSION_30_TIMESTAMP
Definition: ezxmltexttype.php:93
eZXMLTextType\objectAttributeContent
objectAttributeContent( $contentObjectAttribute)
Definition: ezxmltexttype.php:391
eZXMLTextType\concatTextContent
static concatTextContent( $node)
Definition: ezxmltexttype.php:428
eZXMLTextType\editTemplateSuffix
editTemplateSuffix(&$contentobjectAttribute)
Definition: ezxmltexttype.php:344
eZXMLTextType\templateList
templateList()
Definition: ezxmltexttype.php:523
eZXMLTextType\unserializeContentObjectAttribute
unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode)
Definition: ezxmltexttype.php:640
eZXMLTextType\COLS_VARIABLE
const COLS_VARIABLE
Definition: ezxmltexttype.php:86
eZXMLTextType\domString
static domString( $domDocument)
Definition: ezxmltexttype.php:383
eZXMLTextType\__construct
__construct()
Definition: ezxmltexttype.php:98
eZXMLTextType\toString
toString( $contentObjectAttribute)
Definition: ezxmltexttype.php:454
eZXMLTextType\deleteStoredObjectAttribute
deleteStoredObjectAttribute( $contentObjectAttribute, $version=null)
Definition: ezxmltexttype.php:777
eZXMLTextType\rawXMLText
static rawXMLText( $contentObjectAttribute)
Definition: ezxmltexttype.php:363
eZXMLTextType\storeObjectAttribute
storeObjectAttribute( $attribute)
Definition: ezxmltexttype.php:303
eZXMLTextType\customObjectAttributeHTTPAction
customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribute, $parameters)
Definition: ezxmltexttype.php:544
eZXMLTextType\hasObjectAttributeContent
hasObjectAttributeContent( $contentObjectAttribute)
Definition: ezxmltexttype.php:501
eZXMLTextType\COLS_FIELD
const COLS_FIELD
Definition: ezxmltexttype.php:85
eZXMLTextType\serializeContentObjectAttribute
serializeContentObjectAttribute( $package, $objectAttribute)
Definition: ezxmltexttype.php:554
eZXMLTextType\fetchClassAttributeHTTPInput
fetchClassAttributeHTTPInput( $http, $base, $classAttribute)
Definition: ezxmltexttype.php:261
eZXMLTextType\isInformationCollector
isInformationCollector()
Definition: ezxmltexttype.php:515
eZXMLTextType\initializeClassAttribute
initializeClassAttribute( $classAttribute)
Definition: ezxmltexttype.php:108
eZXMLTextType\viewTemplate
viewTemplate( $contentobjectAttribute)
Definition: ezxmltexttype.php:308
eZXMLTextType\postInitializeObjectAttribute
postInitializeObjectAttribute( $objectAttribute, $currentVersion, $originalContentObjectAttribute)
Definition: ezxmltexttype.php:296
eZXMLTextType\DATA_TYPE_STRING
const DATA_TYPE_STRING
Definition: ezxmltexttype.php:84
eZXMLTextType\batchInitializeObjectAttributeData
batchInitializeObjectAttributeData( $classAttribute)
Definition: ezxmltexttype.php:848
eZXMLTextType\validateObjectAttributeHTTPInput
validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute)
Definition: ezxmltexttype.php:250
eZXMLTextType\$deletedStoredObjectAttribute
$deletedStoredObjectAttribute
Definition: ezxmltexttype.php:862
eZXMLText
The class eZXMLText handles XML text data type instances.
Definition: ezxmltext.php:19
ezpI18n\tr
static tr( $context, $source, $comment=null, $arguments=null)
Definition: ezpi18n.php:86
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.