Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezcontentobjectattribute.php
Go to the documentation of this file.
1 <?php
19 class eZContentObjectAttribute extends eZPersistentObject
20 {
21 public $AddToBasketIsValid;
22 public function __construct( $row )
23 {
24 $this->Content = null;
25 $this->DisplayInfo = null;
26 $this->HTTPValue = null;
27 $this->ValidationError = null;
28 $this->ValidationLog = null;
29 $this->ContentClassAttributeIdentifier = null;
30 $this->ContentClassAttributeID = null;
31 $this->InputParameters = false;
32 $this->HasValidationError = false;
33 $this->DataTypeCustom = null;
34 $this->DataTypeString = null;
35 parent::__construct( $row );
36 }
37
38 static function definition()
39 {
40 static $definition = array( "fields" => array( "id" => array( 'name' => 'ID',
41 'datatype' => 'integer',
42 'default' => 0,
43 'required' => true ),
44 "contentobject_id" => array( 'name' => "ContentObjectID",
45 'datatype' => 'integer',
46 'default' => 0,
47 'required' => true,
48 'foreign_class' => 'eZContentObject',
49 'foreign_attribute' => 'id',
50 'multiplicity' => '1..*' ),
51 "version" => array( 'name' => "Version",
52 'datatype' => 'integer',
53 'default' => 0,
54 'required' => true ),
55 "language_code" => array( 'name' => "LanguageCode",
56 'datatype' => 'string',
57 'default' => '',
58 'required' => true ),
59 'language_id' => array( 'name' => "LanguageID",
60 'datatype' => 'integer',
61 'default' => '0',
62 'required' => true,
63 'foreign_class' => 'eZContentLanguage',
64 'foreign_attribute' => 'id',
65 'multiplicity' => '1..*' ),
66 "contentclassattribute_id" => array( 'name' => "ContentClassAttributeID",
67 'datatype' => 'integer',
68 'default' => 0,
69 'required' => true,
70 'foreign_class' => 'eZContentClassAttribute',
71 'foreign_attribute' => 'id',
72 'multiplicity' => '1..*' ),
73 "attribute_original_id" => array( 'name' => "AttributeOriginalID",
74 'datatype' => 'integer',
75 'default' => 0,
76 'required' => true,
77 'foreign_class' => 'eZContentObjectAttribute',
78 'foreign_attribute' => 'id',
79 'multiplicity' => '1..*' ),
80 "sort_key_int" => array( 'name' => "SortKeyInt",
81 'datatype' => 'integer',
82 'default' => '0',
83 'required' => true ),
84 "sort_key_string" => array( 'name' => "SortKeyString",
85 'datatype' => 'string',
86 'max_length' => 255,
87 'default' => '',
88 'required' => true ),
89 "data_type_string" => array( 'name' => "DataTypeString",
90 'datatype' => 'string',
91 'default' => '',
92 'required' => true ),
93 "data_text" => array( 'name' => "DataText",
94 'datatype' => 'text',
95 'default' => '',
96 'required' => true ),
97 "data_int" => array( 'name' => "DataInt",
98 'datatype' => 'integer',
99 'default' => null,
100 'required' => false ),
101 "data_float" => array( 'name' => "DataFloat",
102 'datatype' => 'float',
103 'default' => 0,
104 'required' => true ) ),
105 "keys" => array( "id", "contentobject_id", "version", "language_code" ),
106 "function_attributes" => array( "contentclass_attribute" => "contentClassAttribute",
107 "contentclass_attribute_identifier" => "contentClassAttributeIdentifier",
108 "contentclass_attribute_name" => "contentClassAttributeName",
109 "can_translate" => "contentClassAttributeCanTranslate",
110 "is_information_collector" => "contentClassAttributeIsInformationCollector",
111 "is_required" => "contentClassAttributeIsRequired",
112 "content" => "content",
113 'has_http_value' => 'hasHTTPValue',
114 'value' => 'value',
115 'has_content' => 'hasContent',
116 "class_content" => "classContent",
117 "object" => "object",
118 'object_version' => 'objectVersion',
119 'view_template' => 'viewTemplateName',
120 'edit_template' => 'editTemplateName',
121 'result_template' => 'resultTemplate',
122 "has_validation_error" => "hasValidationError",
123 "validation_error" => "validationError",
124 "validation_log" => "validationLog",
125 "language" => "language",
126 "is_a" => "isA",
127 'display_info' => 'displayInfo',
128 'class_display_info' => 'classDisplayInfo' ),
129 "increment_key" => "id",
130 "class_name" => "eZContentObjectAttribute",
131 "sort" => array( "id" => "asc" ),
132 "name" => "ezcontentobject_attribute" );
133 return $definition;
134 }
135
136 static function fetch( $id, $version, $asObject = true, $field_filters = null )
137 {
138 return eZPersistentObject::fetchObject( eZContentObjectAttribute::definition(),
139 $field_filters,
140 array( "id" => $id,
141 "version" => $version ),
142 $asObject );
143 }
144
145 static function fetchListByClassID( $id, $version = false, $limit = null, $asObject = true, $asCount = false )
146 {
147 $conditions = array();
148 if ( is_array( $id ) )
149 $conditions['contentclassattribute_id'] = array( $id );
150 else
151 $conditions['contentclassattribute_id'] = $id;
152 if ( $version !== false )
153 $conditions["version"] = $version;
154 $fieldFilters = null;
155 $customFields = null;
156 if ( $asCount )
157 {
158 $limit = null;
159 $asObject = false;
160 $fieldFilters = array();
161 $customFields = array( array( 'operation' => 'count( id )',
162 'name' => 'count' ) );
163 }
164 $objectList = eZPersistentObject::fetchObjectList( eZContentObjectAttribute::definition(),
165 $fieldFilters,
166 $conditions,
167 ( $asCount ? false : null ),
168 $limit,
169 $asObject,
170 null,
171 $customFields );
172 if ( $asCount )
173 {
174 return $objectList[0]['count'];
175 }
176 else
177 {
178 return $objectList;
179 }
180 }
181
182 static function fetchByClassAttributeID( $classAttributeID, $objectID, $version, $languageID, $asObject = true )
183 {
184 return eZPersistentObject::fetchObject( eZContentObjectAttribute::definition(),
185 null,
186 array( 'contentclassattribute_id' => $classAttributeID,
187 'contentobject_id' => $objectID,
188 'version' => $version,
189 'language_id' => $languageID ),
190 $asObject );
191 }
192
205 static function fetchSameClassAttributeIDList( $contentClassAttributeID, $asObject = true, $version = false, $contentObjectID = false, $limit = null )
206 {
207 $conditions = array( "contentclassattribute_id" => $contentClassAttributeID );
208 if ( $version !== false )
209 $conditions['version'] = $version;
210 if ( $contentObjectID !== false )
211 $conditions['contentobject_id'] = $contentObjectID;
212 return eZPersistentObject::fetchObjectList( eZContentObjectAttribute::definition(),
213 null,
214 $conditions,
215 null,
216 $limit,
217 $asObject);
218 }
219
229 public function attribute( $attr, $noFunction = false )
230 {
231 // avoiding returning null values for data_text
232 if($attr == 'data_text' && $this->DataText === null)
233 {
234 return '';
235 }
236 return parent::attribute( $attr, $noFunction );
237 }
238
242 function fetchAttributeTranslations( $asObject = true )
243 {
244 return eZPersistentObject::fetchObjectList( eZContentObjectAttribute::definition(),
245 null,
246 array( "contentclassattribute_id" => $this->ContentClassAttributeID,
247 "contentobject_id" => $this->ContentObjectID,
248 "version" => $this->Version ),
249 null,
250 null,
251 $asObject);
252 }
253
254 static function create( $contentclassAttributeID, $contentobjectID, $version = 1, $languageCode = false )
255 {
256 if ( $languageCode == false )
257 {
258 $languageCode = eZContentObject::defaultLanguage();
259 }
260
261 $languageID = eZContentLanguage::idByLocale( $languageCode );
262
263 $row = array(
264 "id" => null,
265 "contentobject_id" => $contentobjectID,
266 "version" => $version,
267 "language_code" => $languageCode,
268 'language_id' => $languageID,
269 "contentclassattribute_id" => $contentclassAttributeID,
270 'data_text' => '',
271 'data_int' => null,
272 'data_float' => 0.0 );
273 return new eZContentObjectAttribute( $row );
274 }
275
280 function store( $fieldFilters = null )
281 {
282 // Unset the cache
283 global $eZContentObjectContentObjectCache;
284 unset( $eZContentObjectContentObjectCache[$this->ContentObjectID] );
285 global $eZContentObjectDataMapCache;
286 unset( $eZContentObjectDataMapCache[$this->ContentObjectID] );
287
288 $classAttribute = $this->contentClassAttribute();
289
290 $dataType = $classAttribute->dataType();
291 if ( $dataType )
292 {
293 $this->setAttribute( 'data_type_string', $classAttribute->attribute( 'data_type_string' ) );
294 $this->updateSortKey( false );
295
296 $db = eZDB::instance();
297 $db->begin();
298
299 // store the content data for this attribute
300 $dataType->storeObjectAttribute( $this );
301
302 parent::store( $fieldFilters );
303 $dataType->postStore( $this );
304 $db->commit();
305 }
306 }
307
316 function storeData()
317 {
318 // Unset the cache
319 global $eZContentObjectContentObjectCache;
320 unset( $eZContentObjectContentObjectCache[$this->ContentObjectID] );
321 global $eZContentObjectDataMapCache;
322 unset( $eZContentObjectDataMapCache[$this->ContentObjectID] );
323
324 $classAttribute = $this->contentClassAttribute();
325 if ( is_object( $classAttribute ) )
326 {
327 $dataType = $classAttribute->dataType();
328 $this->setAttribute( 'data_type_string', $classAttribute->attribute( 'data_type_string' ) );
329 }
330 $this->updateSortKey( false );
331
332 parent::store();
333 }
334
341 function updateSortKey( $storeData = true )
342 {
343 $classAttribute = $this->contentClassAttribute();
344 $dataType = false;
345 if ( is_object( $classAttribute ) )
346 $dataType = $classAttribute->dataType();
347
348 $return = false;
349
350 if ( $dataType )
351 {
352 $return = true;
353
354 $sortKey = $dataType->sortKey( $this );
355 $this->setAttribute( 'sort_key_string', "" );
356 $this->setAttribute( 'sort_key_int', 0 );
357 if ( $dataType->sortKeyType() == 'string' )
358 {
359 $this->setAttribute( 'sort_key_string', $sortKey );
360 $this->setAttribute( 'sort_key_int', 0 );
361
362 }
363 else if ( $dataType->sortKeyType() == 'int' )
364 {
365 $this->setAttribute( 'sort_key_int', $sortKey );
366 }
367
368 if ( $storeData )
369 {
370 $dataType->storeObjectAttribute( $this );
371 $return = parent::store();
372 }
373 }
374
375 return $return;
376 }
377
383 function storeNewRow()
384 {
385 return parent::store();
386 }
387
395 static function fetchByIdentifier( $identifier, $asObject = true )
396 {
397 return eZPersistentObject::fetchObject( eZContentObjectAttribute::definition(),
398 null,
399 array( 'sort_key_string' => $identifier, 'data_type_string' => 'ezstring' ),
400 $asObject );
401 }
402
403 function language( $languageCode = false, $asObject = true )
404 {
405 if ( !$languageCode )
406 {
407 $object = $this->object();
408 if ( !$object )
409 {
410 return null;
411 }
412 $languageCode = $object->initialLanguageCode();
413 }
414 return eZPersistentObject::fetchObject( eZContentObjectAttribute::definition(),
415 null,
416 array( "contentclassattribute_id" => $this->ContentClassAttributeID,
417 "contentobject_id" => $this->ContentObjectID,
418 "version" => $this->Version,
419 "language_code" => $languageCode ),
420 $asObject );
421 }
422
423 function object()
424 {
425 if( isset( $this->ContentObjectID ) and $this->ContentObjectID )
426 {
427 return eZContentObject::fetch( $this->ContentObjectID );
428 }
429 return null;
430 }
431
432 function objectVersion()
433 {
434 return eZContentObjectVersion::fetchVersion( $this->Version, $this->ContentObjectID );
435 }
436
440 function contentClassAttribute()
441 {
442 eZDebug::accumulatorStart( 'instantiate_class_attribute', 'class_abstraction', 'Instantiating content class attribute' );
443 $classAttribute = eZContentClassAttribute::fetch( $this->ContentClassAttributeID );
444 eZDebug::accumulatorStop( 'instantiate_class_attribute' );
445 return $classAttribute;
446 }
447
451 function setContentClassAttributeIdentifier( $identifier )
452 {
453 $this->ContentClassAttributeIdentifier = $identifier;
454 }
455
459 function setContentClassAttributeCanTranslate( $canTranslate )
460 {
461 $this->ContentClassAttributeCanTranslate = $canTranslate;
462 }
463
467 function setContentClassAttributeName( $name )
468 {
469 $this->ContentClassAttributeName = $name;
470 }
471
475 function contentClassAttributeIsRequired()
476 {
477 if ( $this->ContentClassAttributeIsRequired === null )
478 {
479 eZDebug::accumulatorStart( 'class_a_is_req', 'Sytem overhead', 'Fetch class attribute is_required' );
480
481 $classAttribute = eZContentClassAttribute::fetch( $this->ContentClassAttributeID );
482 $this->ContentClassAttributeIsRequired = $classAttribute->attribute( 'is_required' );
483 eZDebug::accumulatorStop( 'class_a_is_req' );
484 }
485
486 return $this->ContentClassAttributeIsRequired;
487 }
488
492 function contentClassAttributeIsInformationCollector()
493 {
494 if ( $this->ContentClassAttributeIsInformationCollector === null )
495 {
496 eZDebug::accumulatorStart( 'class_a_is_ic', 'Sytem overhead', 'Fetch class attribute name' );
497
498 $classAttribute = eZContentClassAttribute::fetch( $this->ContentClassAttributeID );
499 $this->ContentClassAttributeIsInformationCollector = $classAttribute->attribute( 'is_information_collector' );
500 eZDebug::accumulatorStop( 'class_a_is_ic' );
501 }
502
503 return $this->ContentClassAttributeIsInformationCollector;
504 }
505
509 function contentClassAttributeName()
510 {
511 if ( $this->ContentClassAttributeName === null )
512 {
513 eZDebug::accumulatorStart( 'class_a_name', 'Sytem overhead', 'Fetch class attribute name' );
514
515 $classAttribute = eZContentClassAttribute::fetch( $this->ContentClassAttributeID );
516 $this->ContentClassAttributeName = $classAttribute->attribute( 'name' );
517 eZDebug::accumulatorStop( 'class_a_name' );
518 }
519
520 return $this->ContentClassAttributeName;
521 }
522
526 function contentClassAttributeCanTranslate()
527 {
528 if ( $this->ContentClassAttributeCanTranslate === null )
529 {
530 eZDebug::accumulatorStart( 'class_a_can_translate', 'Sytem overhead', 'Fetch class attribute can translate value' );
531
532 $classAttribute = eZContentClassAttribute::fetch( $this->ContentClassAttributeID );
533
534 $dataType = false;
535 if ( is_object($classAttribute) )
536 $dataType = $classAttribute->dataType();
537
538 if ( $dataType &&
539 $dataType->Attributes["properties"]["translation_allowed"] &&
540 $classAttribute->attribute( 'can_translate' ) )
541 $this->ContentClassAttributeCanTranslate = 1;
542 else
543 $this->ContentClassAttributeCanTranslate = 0;
544 eZDebug::accumulatorStop( 'class_a_can_translate' );
545 }
546
547 return $this->ContentClassAttributeCanTranslate;
548 }
549
553 function contentClassAttributeIdentifier()
554 {
555 if ( $this->ContentClassAttributeIdentifier === null )
556 {
557 $this->ContentClassAttributeIdentifier = eZContentClassAttribute::classAttributeIdentifierByID( $this->ContentClassAttributeID );
558 }
559
560 return $this->ContentClassAttributeIdentifier;
561 }
562
567 function validateInput( $http, $base,
568 &$inputParameters, $validationParameters = array() )
569 {
570 $dataType = $this->dataType();
571 if ( $dataType )
572 {
573 $this->setInputParameters( $inputParameters );
574 $this->setValidationParameters( $validationParameters );
575 $this->IsValid = $dataType->validateObjectAttributeHTTPInput( $http, $base, $this );
576 $this->unsetValidationParameters();
577 $this->unsetInputParameters();
578 }
579 return $this->IsValid;
580 }
581
586 function validateAddToBasket( $data, &$errors )
587 {
588 $dataType = $this->dataType();
589 if ( $dataType )
590 {
591 $this->AddToBasketIsValid = $dataType->validateAddToBasket( $this, $data, $errors );
592 }
593 return $this->AddToBasketIsValid;
594 }
595
603 function setInputParameters( $parameters )
604 {
605 $this->InputParameters = $parameters;
606 }
607
612 function unsetInputParameters()
613 {
614 unset( $this->InputParameters );
615 $this->InputParameters = false;
616 }
617
622 function inputParameters()
623 {
624 return $this->InputParameters;
625 }
626
634 function setValidationParameters( $parameters )
635 {
636 $this->ValidationParameters = $parameters;
637 }
638
643 function unsetValidationParameters()
644 {
645 unset( $this->ValidationParameters );
646 $this->ValidationParameters = false;
647 }
648
653 function validationParameters()
654 {
655 return $this->ValidationParameters;
656 }
657
661 function validateIsRequired()
662 {
663 $classAttribute = $this->contentClassAttribute();
664 $validationParameters = $this->validationParameters();
665 if ( !( isset( $validationParameters['skip-isRequired'] ) && $validationParameters['skip-isRequired'] === true ) && $classAttribute->attribute( "is_required" ) )
666 return true;
667
668 return false;
669 }
670
674 function fixupInput( $http, $base )
675 {
676 $dataType = $this->dataType();
677 if ( $dataType )
678 $dataType->fixupObjectAttributeHTTPInput( $http, $base, $this );
679 }
680
684 function fetchInput( $http, $base )
685 {
686 $dataType = $this->dataType();
687 if ( $dataType )
688 return $dataType->fetchObjectAttributeHTTPInput( $http, $base, $this );
689
690 return false;
691 }
692
696 function validateInformation( $http, $base,
697 &$inputParameters, $validationParameters = array() )
698 {
699 $dataType = $this->dataType();
700 if ( $dataType )
701 {
702 $this->setInputParameters( $inputParameters );
703 $this->setValidationParameters( $validationParameters );
704 $this->IsValid = $dataType->validateCollectionAttributeHTTPInput( $http, $base, $this );
705 $this->unsetValidationParameters();
706 $this->unsetInputParameters();
707 }
708 return $this->IsValid;
709 }
710
714 function collectInformation( $collection, &$collectionAttribute, $http, $base )
715 {
716 $dataType = $this->dataType();
717 if ( $dataType )
718 {
719 $collectionAttribute->setAttribute( 'contentclass_attribute_id', $this->attribute( 'contentclassattribute_id' ) );
720 $collectionAttribute->setAttribute( 'contentobject_attribute_id', $this->attribute( 'id' ) );
721 $collectionAttribute->setAttribute( 'contentobject_id', $this->attribute( 'contentobject_id' ) );
722 return $dataType->fetchCollectionAttributeHTTPInput( $collection, $collectionAttribute, $http, $base, $this );
723 }
724
725 return false;
726 }
727
731 function customHTTPAction( $http, $action, $parameters = array() )
732 {
733 $dataType = $this->dataType();
734 if ( $dataType )
735 $dataType->customObjectAttributeHTTPAction( $http, $action, $this, $parameters );
736 }
737
741 function handleCustomHTTPActions( $http, $attributeDataBaseName,
742 $customActionAttributeArray, $customActionParameters )
743 {
744 $dataType = $this->dataType();
745 if ( $dataType )
746 {
747 $customActionParameters['contentobject_attribute'] = $this;
748 $dataType->handleCustomObjectHTTPActions( $http, $attributeDataBaseName,
749 $customActionAttributeArray, $customActionParameters );
750 }
751 }
752
757 function onPublish( $object, $nodes )
758 {
759 $dataType = $this->dataType();
760 if ( $dataType )
761 $dataType->onPublish( $this, $object, $nodes );
762 }
763
773 function insertHTTPFile( $object, $objectVersion, $objectLanguage,
774 $httpFile, $mimeData,
775 &$result )
776 {
777 if ( !$object )
778 $object = $this->object();
779 if ( $objectVersion === false )
780 $objectVersion = $object->attribute( 'current_version' );
781 if ( $objectLanguage === false )
782 $objectLanguage = $object->attribute( 'default_language' );
783 $dataType = $this->dataType();
784 return $dataType->insertHTTPFile( $object, $objectVersion, $objectLanguage,
785 $this, $httpFile, $mimeData,
786 $result );
787 }
788
798 function insertRegularFile( $object, $objectVersion, $objectLanguage,
799 $filePath,
800 &$result )
801 {
802 if ( !$object )
803 $object = $this->object();
804 if ( $objectVersion === false )
805 $objectVersion = $object->attribute( 'current_version' );
806 if ( $objectLanguage === false )
807 $objectLanguage = $object->attribute( 'default_language' );
808 $dataType = $this->dataType();
809 return $dataType->insertRegularFile( $object, $objectVersion, $objectLanguage,
810 $this, $filePath,
811 $result );
812 }
813
823 function insertSimpleString( $object, $objectVersion, $objectLanguage,
824 $string,
825 &$result )
826 {
827 if ( !$object )
828 $object = $this->object();
829 if ( $objectVersion === false )
830 $objectVersion = $object->attribute( 'current_version' );
831 if ( $objectLanguage === false )
832 $objectLanguage = $object->attribute( 'default_language' );
833 $dataType = $this->dataType();
834 return $dataType->insertSimpleString( $object, $objectVersion, $objectLanguage,
835 $this, $string,
836 $result );
837 }
838
842 function hasStoredFileInformation( $object, $objectVersion, $objectLanguage )
843 {
844 if ( !$object )
845 $object = $this->object();
846 if ( $objectVersion === false )
847 $objectVersion = $object->attribute( 'current_version' );
848 if ( $objectLanguage === false )
849 $objectLanguage = $object->attribute( 'default_language' );
850 $dataType = $this->dataType();
851 return $dataType->hasStoredFileInformation( $object, $objectVersion, $objectLanguage,
852 $this );
853 }
854
858 function storedFileInformation( $object, $objectVersion, $objectLanguage )
859 {
860 if ( !$object )
861 $object = $this->object();
862 if ( $objectVersion === false )
863 $objectVersion = $object->attribute( 'current_version' );
864 if ( $objectLanguage === false )
865 $objectLanguage = $object->attribute( 'default_language' );
866 $dataType = $this->dataType();
867 return $dataType->storedFileInformation( $object, $objectVersion, $objectLanguage,
868 $this );
869 }
870
874 function handleDownload( $object, $objectVersion, $objectLanguage )
875 {
876 if ( !$object )
877 $object = $this->object();
878 if ( $objectVersion === false )
879 $objectVersion = $object->attribute( 'current_version' );
880 if ( $objectLanguage === false )
881 $objectLanguage = $object->attribute( 'default_language' );
882 $dataType = $this->dataType();
883 return $dataType->handleDownload( $object, $objectVersion, $objectLanguage,
884 $this );
885 }
886
896 function initialize( $currentVersion = null, $originalContentObjectAttribute = null )
897 {
898 if ( $originalContentObjectAttribute === null )
899 $originalContentObjectAttribute = $this;
900 $classAttribute = $this->contentClassAttribute();
901 $dataType = $classAttribute->dataType();
902 if ( $dataType )
903 $dataType->initializeObjectAttribute( $this, $currentVersion, $originalContentObjectAttribute );
904 }
905
909 function postInitialize( $currentVersion = null, $originalContentObjectAttribute = null )
910 {
911 if ( $originalContentObjectAttribute === null )
912 $originalContentObjectAttribute = $this;
913 $classAttribute = $this->contentClassAttribute();
914 $dataType = $classAttribute->dataType();
915 if ( $dataType )
916 $dataType->postInitializeObjectAttribute( $this, $currentVersion, $originalContentObjectAttribute );
917 }
918
924 function removeThis( $id, $currentVersion = null )
925 {
926 $dataType = $this->dataType();
927 if ( !$dataType )
928 return false;
929 $dataType->deleteStoredObjectAttribute( $this, $currentVersion );
930 if( $currentVersion == null )
931 {
932 eZPersistentObject::removeObject( eZContentObjectAttribute::definition(),
933 array( "id" => $id ) );
934 }
935 else
936 {
937 eZPersistentObject::removeObject( eZContentObjectAttribute::definition(),
938 array( "id" => $id,
939 "version" => $currentVersion ) );
940 }
941 }
942
957 function cloneContentObjectAttribute( $newVersionNumber, $currentVersionNumber, $contentObjectID = false, $newLanguageCode = false )
958 {
959 $tmp = clone $this;
960 $tmp->setAttribute( "version", $newVersionNumber );
961 if ( $contentObjectID != false )
962 {
963 // if copying the whole object
964 if ( $contentObjectID != $tmp->attribute( 'contentobject_id' ) )
965 {
966 $exAttr = eZPersistentObject::fetchObject( eZContentObjectAttribute::definition(),
967 null,
968 array( 'contentobject_id' => $contentObjectID,
969 'contentclassattribute_id' => $tmp->attribute( 'contentclassattribute_id' ),
970 'language_code' => $tmp->attribute( 'language_code' ) ),
971 true );
972
973 // if the new object already contains the same attribute with another version
974 if ( is_object( $exAttr ) )
975 // we take attribute id from it
976 $id = $exAttr->attribute( 'id' );
977 else
978 // otherwise new attribute id will be generated
979 $id = null;
980
981 $tmp->setAttribute( 'id', $id );
982 }
983 $tmp->setAttribute( 'contentobject_id', $contentObjectID );
984 }
985 else
986 {
987 // if not copying, we will remove the information on which language has to be always shown
988 $tmp->setAttribute( 'language_id', $tmp->attribute( 'language_id' ) & ~1 );
989 }
990
991 if ( $newLanguageCode != false && $tmp->attribute( 'language_code' ) != $newLanguageCode )
992 {
993 $exAttr = eZPersistentObject::fetchObject( eZContentObjectAttribute::definition(),
994 null,
995 array( 'contentobject_id' => $contentObjectID? $contentObjectID: $tmp->attribute( 'contentobject_id' ),
996 'contentclassattribute_id' => $tmp->attribute( 'contentclassattribute_id' ),
997 'language_code' => $newLanguageCode ),
998 true );
999 // if the new object already contains the same attribute with another version
1000 if ( is_object( $exAttr ) )
1001 {
1002 $id = $exAttr->attribute( 'id' );
1003 }
1004 else
1005 {
1006 $id = null;
1007 }
1008 $tmp->setAttribute( 'id', $id );
1009 $tmp->setAttribute( 'language_code', $newLanguageCode );
1010 $tmp->setAttribute( 'language_id', eZContentLanguage::idByLocale( $newLanguageCode ) );
1011 }
1012
1013 $db = eZDB::instance();
1014 $db->begin();
1015 $tmp->sync();
1016 $tmp->initialize( $currentVersionNumber, $this );
1017 $tmp->sync();
1018 $tmp->postInitialize( $currentVersionNumber, $this );
1019 $db->commit();
1020
1021 return $tmp;
1022 }
1023
1031 function translateTo( $languageCode, $updateLanguageMask = true )
1032 {
1033 $languageID = eZContentLanguage::idByLocale( $languageCode );
1034
1035 $tmp = clone $this;
1036 $tmp->setAttribute( 'id', null );
1037 $tmp->setAttribute( 'language_code', $languageCode );
1038 $tmp->setAttribute( 'language_id', $languageID );
1039
1040 $db = eZDB::instance();
1041 $db->begin();
1042 $tmp->sync();
1043 $currentVersionNumber = $this->attribute( 'version' );
1044 $tmp->initialize( $currentVersionNumber, $this );
1045 $tmp->sync();
1046 $tmp->postInitialize( $currentVersionNumber, $this );
1047 if ( $updateLanguageMask )
1048 {
1049 $version = $tmp->objectVersion();
1050 $version->updateLanguageMask( (int) $version->languageMask() | (int) $languageID, false );
1051 }
1052 $db->commit();
1053
1054 // Clear in-memory content cache
1055 $tmpnull = null;
1056 $tmp->setContent( $tmpnull );
1057
1058 return $tmp;
1059 }
1060
1065 function dataType()
1066 {
1067 $dataType = null;
1068 if( $this->DataTypeString !== null )
1069 $dataType = eZDataType::create( $this->DataTypeString );
1070
1071 return $dataType;
1072 }
1073
1077 function title()
1078 {
1079 $dataType = $this->dataType();
1080 if ( $dataType )
1081 return $dataType->title( $this );
1082
1083 return '';
1084 }
1085
1089 function classContent()
1090 {
1091 $attribute = $this->contentClassAttribute();
1092 return $attribute->content();
1093 }
1094
1098 function setHTTPValue( $value )
1099 {
1100 $this->HTTPValue = $value;
1101 }
1102
1106 function value()
1107 {
1108 if ( $this->HTTPValue !== null )
1109 return $this->HTTPValue;
1110 else
1111 return $this->content();
1112 }
1113
1117 function hasHTTPValue()
1118 {
1119 if ( $this->HTTPValue !== null )
1120 {
1121 return true;
1122 }
1123 return false;
1124 }
1125
1129 function content()
1130 {
1131 if ( $this->Content === null )
1132 {
1133 $dataType = $this->dataType();
1134 if ( $dataType )
1135 $this->Content = $dataType->objectAttributeContent( $this );
1136 }
1137 return $this->Content;
1138 }
1139
1145 function hasContent()
1146 {
1147 $dataType = $this->dataType();
1148 if ( $dataType )
1149 {
1150 return $dataType->hasObjectAttributeContent( $this );
1151 }
1152 return false;
1153 }
1154
1159 function metaData()
1160 {
1161 $dataType = $this->dataType();
1162 if ( $dataType )
1163 return $dataType->metaData( $this );
1164 else
1165 return false;
1166 }
1171 function toString()
1172 {
1173 $dataType = $this->dataType();
1174 if ( $dataType )
1175 return $dataType->toString( $this );
1176 else
1177 return false;
1178 }
1183 function fromString( $string )
1184 {
1185 $dataType = $this->dataType();
1186 if ( $dataType )
1187 return $dataType->fromString( $this, $string );
1188 else
1189 return false;
1190 }
1191
1192
1198 static function metaDataArray( &$attributes, $skipRelationAttributes = false )
1199 {
1200 $metaDataArray = array();
1201 if ( !is_array( $attributes ) )
1202 return false;
1203 foreach( $attributes as $attribute )
1204 {
1205 $classAttribute = $attribute->contentClassAttribute();
1206 if ( !$classAttribute->attribute( 'is_searchable' ) )
1207 {
1208 continue;
1209 }
1210
1211 $datatype = $attribute->dataType();
1212 if ( $skipRelationAttributes && $datatype->isRelationType() )
1213 {
1214 continue;
1215 }
1216
1217 $attributeMetaData = $datatype->metaData($attribute);
1218 if ( $attributeMetaData !== false )
1219 {
1220 if ( !is_array( $attributeMetaData ) )
1221 {
1222 $attributeMetaData = array( array( 'id' => '',
1223 'text' => $attributeMetaData ) );
1224 }
1225 $metaDataArray = array_merge( $metaDataArray, $attributeMetaData );
1226 }
1227 }
1228 return $metaDataArray;
1229 }
1230
1231
1235 function setContent( $content )
1236 {
1237 $this->Content = $content;
1238 }
1239
1244 function displayInfo()
1245 {
1246 if ( !$this->DisplayInfo )
1247 {
1248 $dataType = $this->dataType();
1249 if ( $dataType )
1250 $this->DisplayInfo = $dataType->objectDisplayInformation( $this, false );
1251 }
1252 return $this->DisplayInfo;
1253 }
1254
1260 function classDisplayInfo()
1261 {
1262 $classAttribute = $this->contentClassAttribute();
1263 if ( !$classAttribute->DisplayInfo )
1264 {
1265 $dataType = $this->dataType();
1266 if ( $dataType )
1267 {
1268 $classAttribute->DisplayInfo = $dataType->classDisplayInformation( $classAttribute, false );
1269 }
1270 }
1271 return $classAttribute->DisplayInfo;
1272 }
1273
1277 function contentActionList()
1278 {
1279 $dataType = $this->dataType();
1280 if ( $dataType )
1281 {
1282 return $dataType->contentActionList( $this->contentClassAttribute() );
1283 }
1284 return false;
1285 }
1286
1287 function setValidationError()
1288 {
1289 $numargs = func_num_args();
1290 if ( $numargs < 1 )
1291 {
1292 trigger_error( 'Function must take at least one parameter', E_USER_WARNING );
1293 return;
1294 }
1295 $argList = func_get_args();
1296 $text = eZContentObjectAttribute::generateValidationErrorText( $numargs, $argList );
1297 $this->ValidationError = $text;
1298 $this->HasValidationError = true;
1299 }
1300
1301 function setHasValidationError( $hasError = true )
1302 {
1303 $this->HasValidationError = $hasError;
1304 }
1305
1306 function hasValidationError()
1307 {
1308 return $this->HasValidationError;
1309 }
1310
1311 static function generateValidationErrorText( $numargs, $argList )
1312 {
1313 $text = $argList[0];
1314 for ( $i = 1; $i < $numargs; ++$i )
1315 {
1316 $arg = $argList[$i];
1317 $text = str_replace( "%$i", $arg, $text );
1318 }
1319 return $text;
1320 }
1321
1322 function setValidationLog( $text )
1323 {
1324 if ( is_string( $text ) )
1325 {
1326 $logMessage = array();
1327 $logMessage[] = $text;
1328 $this->ValidationLog = $logMessage;
1329 }
1330 elseif ( is_array( $text ) )
1331 {
1332 $this->ValidationLog = $text;
1333 }
1334 else
1335 {
1336 $this->ValidationLog = null;
1337 }
1338 }
1339
1340 function validationError()
1341 {
1342 return $this->ValidationError;
1343 }
1344
1345 function validationLog()
1346 {
1347 return $this->ValidationLog;
1348 }
1349
1350 function serialize( $package )
1351 {
1352 $result = false;
1353 $dataType = $this->dataType();
1354 if ( $dataType )
1355 $result = $dataType->serializeContentObjectAttribute( $package, $this );
1356
1357 return $result;
1358 }
1359
1360 function unserialize( $package, $attributeDOMNode )
1361 {
1362 $dataType = $this->dataType();
1363 if ( $dataType )
1364 $dataType->unserializeContentObjectAttribute( $package, $this, $attributeDOMNode );
1365 }
1366
1367 function postUnserialize( $package )
1368 {
1369 $dataType = $this->dataType();
1370 if ( $dataType )
1371 {
1372 $result = $dataType->postUnserializeContentObjectAttribute( $package, $this );
1373 if ( $result )
1374 {
1375 $this->store();
1376 }
1377 }
1378 }
1379
1380 function isA()
1381 {
1382 $dataType = $this->dataType();
1383 if ( $dataType )
1384 {
1385 return $dataType->isA();
1386 }
1387 return false;
1388 }
1389
1397 function viewTemplateName()
1398 {
1399 /* This will not work, datatypes should be able to override this .e.g Online Editor
1400 // Don't need to do lookup since we already know the datatype string, which is the result
1401 return $this->DataTypeString;
1402 */
1403
1404 $classAttribute = $this->contentClassAttribute();
1405 if ( $classAttribute->attribute( 'is_information_collector' ) )
1406 {
1407 return $this->informationTemplate();
1408 }
1409 return $this->viewTemplate();
1410 }
1411
1415 function editTemplateName()
1416 {
1417 return $this->editTemplate();
1418 }
1419
1425 function viewTemplate()
1426 {
1427 /* This will not work, datatypes should be able to override this .e.g Online Editor
1428 return $this->DataTypeString;
1429 // We really don't need to do a lookup via the datatype since we already have the string
1430 */
1431 $dataType = $this->dataType();
1432 if ( $dataType )
1433 {
1434 return $dataType->viewTemplate( $this );
1435 }
1436 return false;
1437 }
1438
1444 function editTemplate()
1445 {
1446 $dataType = $this->dataType();
1447 if ( $dataType )
1448 {
1449 return $dataType->editTemplate( $this );
1450 }
1451 return false;
1452 }
1453
1459 function informationTemplate()
1460 {
1461 /* This will not work, datatypes should be able to override this .e.g Online Editor
1462 return $this->DataTypeString;
1463 */
1464 $dataType = $this->dataType();
1465 if ( $dataType )
1466 {
1467 return $dataType->informationTemplate( $this );
1468 }
1469 return false;
1470 }
1471
1477 function resultTemplate()
1478 {
1479 /* This will not work, datatypes should be able to override this .e.g Online Editor
1480 return $this->DataTypeString;
1481 */
1482 $dataType = $this->dataType();
1483 if ( $dataType )
1484 {
1485 return $dataType->resultTemplate( $this );
1486 }
1487 return false;
1488 }
1489
1494 public static function removeRelationsByContentClassAttributeId( $attributeId )
1495 {
1496 $id = (int)$attributeId;
1497 $db = eZDB::instance();
1498 $db->query( "DELETE FROM ezcontentobject_link WHERE contentclassattribute_id=$id" );
1499 }
1500
1502 public $HTTPValue;
1503
1505 public $Content;
1506
1508 public $DisplayInfo;
1509
1511 public $IsValid;
1512
1513 public $ContentClassAttributeID;
1514
1516 public $ValidationError;
1517
1519 public $ValidationLog;
1520
1522 public $ContentClassAttributeIdentifier;
1523 public $ContentClassAttributeCanTranslate;
1524 public $ContentClassAttributeName;
1525 public $ContentClassAttributeIsInformationCollector;
1526 public $ContentClassAttributeIsRequired;
1527
1528 public $ValidationParameters = array();
1529 public $InputParameters;
1530 public $HasValidationError;
1531 public $DataTypeCustom;
1532 public $DataTypeString;
1533 public $Version;
1534 public $LanguageCode;
1535 public $LanguageID;
1536 public $AttributeOriginalID;
1537 public $SortKeyInt;
1538 public $SortKeyString;
1539 public $DataText;
1540 public $DataInt;
1541 public $DataFloat;
1542
1543 }
1544
1545 ?>
eZContentClassAttribute\classAttributeIdentifierByID
static classAttributeIdentifierByID( $id)
Definition: ezcontentclassattribute.php:882
eZContentClassAttribute\fetch
static fetch( $id, $asObject=true, $version=eZContentClass::VERSION_STATUS_DEFINED, $field_filters=null)
Definition: ezcontentclassattribute.php:380
eZContentLanguage\idByLocale
static idByLocale( $locale)
Definition: ezcontentlanguage.php:637
eZContentObjectAttribute
Encapsulates the data for an object attribute.
Definition: ezcontentobjectattribute.php:20
eZContentObjectAttribute\insertHTTPFile
insertHTTPFile( $object, $objectVersion, $objectLanguage, $httpFile, $mimeData, &$result)
Definition: ezcontentobjectattribute.php:773
eZContentObjectAttribute\$Version
$Version
Definition: ezcontentobjectattribute.php:1533
eZContentObjectAttribute\initialize
initialize( $currentVersion=null, $originalContentObjectAttribute=null)
Definition: ezcontentobjectattribute.php:896
eZContentObjectAttribute\fetch
static fetch( $id, $version, $asObject=true, $field_filters=null)
Definition: ezcontentobjectattribute.php:136
eZContentObjectAttribute\postInitialize
postInitialize( $currentVersion=null, $originalContentObjectAttribute=null)
Definition: ezcontentobjectattribute.php:909
eZContentObjectAttribute\dataType
dataType()
Definition: ezcontentobjectattribute.php:1065
eZContentObjectAttribute\$InputParameters
$InputParameters
Definition: ezcontentobjectattribute.php:1529
eZContentObjectAttribute\storeData
storeData()
Definition: ezcontentobjectattribute.php:316
eZContentObjectAttribute\contentClassAttributeIsRequired
contentClassAttributeIsRequired()
Definition: ezcontentobjectattribute.php:475
eZContentObjectAttribute\fetchInput
fetchInput( $http, $base)
Definition: ezcontentobjectattribute.php:684
eZContentObjectAttribute\validateIsRequired
validateIsRequired()
Definition: ezcontentobjectattribute.php:661
eZContentObjectAttribute\metaData
metaData()
Definition: ezcontentobjectattribute.php:1159
eZContentObjectAttribute\$HasValidationError
$HasValidationError
Definition: ezcontentobjectattribute.php:1530
eZContentObjectAttribute\informationTemplate
informationTemplate()
Definition: ezcontentobjectattribute.php:1459
eZContentObjectAttribute\editTemplate
editTemplate()
Definition: ezcontentobjectattribute.php:1444
eZContentObjectAttribute\unsetValidationParameters
unsetValidationParameters()
Definition: ezcontentobjectattribute.php:643
eZContentObjectAttribute\viewTemplateName
viewTemplateName()
Definition: ezcontentobjectattribute.php:1397
eZContentObjectAttribute\cloneContentObjectAttribute
cloneContentObjectAttribute( $newVersionNumber, $currentVersionNumber, $contentObjectID=false, $newLanguageCode=false)
Definition: ezcontentobjectattribute.php:957
eZContentObjectAttribute\onPublish
onPublish( $object, $nodes)
Definition: ezcontentobjectattribute.php:757
eZContentObjectAttribute\create
static create( $contentclassAttributeID, $contentobjectID, $version=1, $languageCode=false)
Definition: ezcontentobjectattribute.php:254
eZContentObjectAttribute\definition
static definition()
Definition: ezcontentobjectattribute.php:38
eZContentObjectAttribute\fetchAttributeTranslations
fetchAttributeTranslations( $asObject=true)
Definition: ezcontentobjectattribute.php:242
eZContentObjectAttribute\setHTTPValue
setHTTPValue( $value)
Definition: ezcontentobjectattribute.php:1098
eZContentObjectAttribute\validateAddToBasket
validateAddToBasket( $data, &$errors)
Definition: ezcontentobjectattribute.php:586
eZContentObjectAttribute\customHTTPAction
customHTTPAction( $http, $action, $parameters=array())
Definition: ezcontentobjectattribute.php:731
eZContentObjectAttribute\contentClassAttribute
contentClassAttribute()
Definition: ezcontentobjectattribute.php:440
eZContentObjectAttribute\translateTo
translateTo( $languageCode, $updateLanguageMask=true)
Definition: ezcontentobjectattribute.php:1031
eZContentObjectAttribute\$DataInt
$DataInt
Definition: ezcontentobjectattribute.php:1540
eZContentObjectAttribute\updateSortKey
updateSortKey( $storeData=true)
Definition: ezcontentobjectattribute.php:341
eZContentObjectAttribute\resultTemplate
resultTemplate()
Definition: ezcontentobjectattribute.php:1477
eZContentObjectAttribute\validationParameters
validationParameters()
Definition: ezcontentobjectattribute.php:653
eZContentObjectAttribute\$AttributeOriginalID
$AttributeOriginalID
Definition: ezcontentobjectattribute.php:1536
eZContentObjectAttribute\$DataTypeCustom
$DataTypeCustom
Definition: ezcontentobjectattribute.php:1531
eZContentObjectAttribute\setContentClassAttributeCanTranslate
setContentClassAttributeCanTranslate( $canTranslate)
Definition: ezcontentobjectattribute.php:459
eZContentObjectAttribute\setValidationLog
setValidationLog( $text)
Definition: ezcontentobjectattribute.php:1322
eZContentObjectAttribute\$ValidationParameters
$ValidationParameters
Definition: ezcontentobjectattribute.php:1528
eZContentObjectAttribute\$HTTPValue
$HTTPValue
Contains the value(s) submitted in HTTP form.
Definition: ezcontentobjectattribute.php:1502
eZContentObjectAttribute\insertRegularFile
insertRegularFile( $object, $objectVersion, $objectLanguage, $filePath, &$result)
Definition: ezcontentobjectattribute.php:798
eZContentObjectAttribute\viewTemplate
viewTemplate()
Definition: ezcontentobjectattribute.php:1425
eZContentObjectAttribute\contentClassAttributeIdentifier
contentClassAttributeIdentifier()
Definition: ezcontentobjectattribute.php:553
eZContentObjectAttribute\$ContentClassAttributeIsRequired
$ContentClassAttributeIsRequired
Definition: ezcontentobjectattribute.php:1526
eZContentObjectAttribute\fetchListByClassID
static fetchListByClassID( $id, $version=false, $limit=null, $asObject=true, $asCount=false)
Definition: ezcontentobjectattribute.php:145
eZContentObjectAttribute\__construct
__construct( $row)
Definition: ezcontentobjectattribute.php:22
eZContentObjectAttribute\fixupInput
fixupInput( $http, $base)
Definition: ezcontentobjectattribute.php:674
eZContentObjectAttribute\$ContentClassAttributeIsInformationCollector
$ContentClassAttributeIsInformationCollector
Definition: ezcontentobjectattribute.php:1525
eZContentObjectAttribute\removeThis
removeThis( $id, $currentVersion=null)
Definition: ezcontentobjectattribute.php:924
eZContentObjectAttribute\inputParameters
inputParameters()
Definition: ezcontentobjectattribute.php:622
eZContentObjectAttribute\$SortKeyString
$SortKeyString
Definition: ezcontentobjectattribute.php:1538
eZContentObjectAttribute\setValidationParameters
setValidationParameters( $parameters)
Definition: ezcontentobjectattribute.php:634
eZContentObjectAttribute\$ContentClassAttributeCanTranslate
$ContentClassAttributeCanTranslate
Definition: ezcontentobjectattribute.php:1523
eZContentObjectAttribute\hasContent
hasContent()
Definition: ezcontentobjectattribute.php:1145
eZContentObjectAttribute\$ValidationError
$ValidationError
Contains the last validation error.
Definition: ezcontentobjectattribute.php:1516
eZContentObjectAttribute\contentClassAttributeCanTranslate
contentClassAttributeCanTranslate()
Definition: ezcontentobjectattribute.php:526
eZContentObjectAttribute\validationError
validationError()
Definition: ezcontentobjectattribute.php:1340
eZContentObjectAttribute\hasHTTPValue
hasHTTPValue()
Definition: ezcontentobjectattribute.php:1117
eZContentObjectAttribute\$AddToBasketIsValid
$AddToBasketIsValid
Definition: ezcontentobjectattribute.php:21
eZContentObjectAttribute\$LanguageCode
$LanguageCode
Definition: ezcontentobjectattribute.php:1534
eZContentObjectAttribute\fetchByIdentifier
static fetchByIdentifier( $identifier, $asObject=true)
Definition: ezcontentobjectattribute.php:395
eZContentObjectAttribute\unsetInputParameters
unsetInputParameters()
Definition: ezcontentobjectattribute.php:612
eZContentObjectAttribute\contentClassAttributeName
contentClassAttributeName()
Definition: ezcontentobjectattribute.php:509
eZContentObjectAttribute\validationLog
validationLog()
Definition: ezcontentobjectattribute.php:1345
eZContentObjectAttribute\$ValidationLog
$ValidationLog
Contains the last validation error.
Definition: ezcontentobjectattribute.php:1519
eZContentObjectAttribute\$DataFloat
$DataFloat
Definition: ezcontentobjectattribute.php:1541
eZContentObjectAttribute\validateInformation
validateInformation( $http, $base, &$inputParameters, $validationParameters=array())
Definition: ezcontentobjectattribute.php:696
eZContentObjectAttribute\$Content
$Content
Contains the content for this attribute.
Definition: ezcontentobjectattribute.php:1505
eZContentObjectAttribute\collectInformation
collectInformation( $collection, &$collectionAttribute, $http, $base)
Definition: ezcontentobjectattribute.php:714
eZContentObjectAttribute\$DataText
$DataText
Definition: ezcontentobjectattribute.php:1539
eZContentObjectAttribute\setContentClassAttributeIdentifier
setContentClassAttributeIdentifier( $identifier)
Definition: ezcontentobjectattribute.php:451
eZContentObjectAttribute\setContentClassAttributeName
setContentClassAttributeName( $name)
Definition: ezcontentobjectattribute.php:467
eZContentObjectAttribute\$ContentClassAttributeID
$ContentClassAttributeID
Definition: ezcontentobjectattribute.php:1513
eZContentObjectAttribute\generateValidationErrorText
static generateValidationErrorText( $numargs, $argList)
Definition: ezcontentobjectattribute.php:1311
eZContentObjectAttribute\$LanguageID
$LanguageID
Definition: ezcontentobjectattribute.php:1535
eZContentObjectAttribute\fromString
fromString( $string)
Definition: ezcontentobjectattribute.php:1183
eZContentObjectAttribute\postUnserialize
postUnserialize( $package)
Definition: ezcontentobjectattribute.php:1367
eZContentObjectAttribute\displayInfo
displayInfo()
Definition: ezcontentobjectattribute.php:1244
eZContentObjectAttribute\contentActionList
contentActionList()
Definition: ezcontentobjectattribute.php:1277
eZContentObjectAttribute\handleCustomHTTPActions
handleCustomHTTPActions( $http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
Definition: ezcontentobjectattribute.php:741
eZContentObjectAttribute\handleDownload
handleDownload( $object, $objectVersion, $objectLanguage)
Definition: ezcontentobjectattribute.php:874
eZContentObjectAttribute\validateInput
validateInput( $http, $base, &$inputParameters, $validationParameters=array())
Definition: ezcontentobjectattribute.php:567
eZContentObjectAttribute\$DataTypeString
$DataTypeString
Definition: ezcontentobjectattribute.php:1532
eZContentObjectAttribute\contentClassAttributeIsInformationCollector
contentClassAttributeIsInformationCollector()
Definition: ezcontentobjectattribute.php:492
eZContentObjectAttribute\insertSimpleString
insertSimpleString( $object, $objectVersion, $objectLanguage, $string, &$result)
Definition: ezcontentobjectattribute.php:823
eZContentObjectAttribute\object
object()
Definition: ezcontentobjectattribute.php:423
eZContentObjectAttribute\serialize
serialize( $package)
Definition: ezcontentobjectattribute.php:1350
eZContentObjectAttribute\language
language( $languageCode=false, $asObject=true)
Definition: ezcontentobjectattribute.php:403
eZContentObjectAttribute\objectVersion
objectVersion()
Definition: ezcontentobjectattribute.php:432
eZContentObjectAttribute\classContent
classContent()
Definition: ezcontentobjectattribute.php:1089
eZContentObjectAttribute\$ContentClassAttributeIdentifier
$ContentClassAttributeIdentifier
Definition: ezcontentobjectattribute.php:1522
eZContentObjectAttribute\$IsValid
$IsValid
Stores the is valid.
Definition: ezcontentobjectattribute.php:1511
eZContentObjectAttribute\$DisplayInfo
$DisplayInfo
Contains information on how to display the current attribute in various viewmodes.
Definition: ezcontentobjectattribute.php:1508
eZContentObjectAttribute\classDisplayInfo
classDisplayInfo()
Definition: ezcontentobjectattribute.php:1260
eZContentObjectAttribute\setContent
setContent( $content)
Definition: ezcontentobjectattribute.php:1235
eZContentObjectAttribute\content
content()
Definition: ezcontentobjectattribute.php:1129
eZContentObjectAttribute\hasStoredFileInformation
hasStoredFileInformation( $object, $objectVersion, $objectLanguage)
Definition: ezcontentobjectattribute.php:842
eZContentObjectAttribute\storeNewRow
storeNewRow()
Definition: ezcontentobjectattribute.php:383
eZContentObjectAttribute\$ContentClassAttributeName
$ContentClassAttributeName
Definition: ezcontentobjectattribute.php:1524
eZContentObjectAttribute\editTemplateName
editTemplateName()
Definition: ezcontentobjectattribute.php:1415
eZContentObjectAttribute\value
value()
Definition: ezcontentobjectattribute.php:1106
eZContentObjectAttribute\title
title()
Definition: ezcontentobjectattribute.php:1077
eZContentObjectAttribute\storedFileInformation
storedFileInformation( $object, $objectVersion, $objectLanguage)
Definition: ezcontentobjectattribute.php:858
eZContentObjectAttribute\attribute
attribute( $attr, $noFunction=false)
Definition: ezcontentobjectattribute.php:229
eZContentObjectAttribute\hasValidationError
hasValidationError()
Definition: ezcontentobjectattribute.php:1306
eZContentObjectAttribute\setInputParameters
setInputParameters( $parameters)
Definition: ezcontentobjectattribute.php:603
eZContentObjectAttribute\$SortKeyInt
$SortKeyInt
Definition: ezcontentobjectattribute.php:1537
eZContentObjectAttribute\store
store( $fieldFilters=null)
Definition: ezcontentobjectattribute.php:280
eZContentObjectAttribute\metaDataArray
static metaDataArray(&$attributes, $skipRelationAttributes=false)
Definition: ezcontentobjectattribute.php:1198
eZContentObjectAttribute\unserialize
unserialize( $package, $attributeDOMNode)
Definition: ezcontentobjectattribute.php:1360
eZContentObjectAttribute\setHasValidationError
setHasValidationError( $hasError=true)
Definition: ezcontentobjectattribute.php:1301
eZContentObjectAttribute\fetchByClassAttributeID
static fetchByClassAttributeID( $classAttributeID, $objectID, $version, $languageID, $asObject=true)
Definition: ezcontentobjectattribute.php:182
eZContentObjectAttribute\setValidationError
setValidationError()
Definition: ezcontentobjectattribute.php:1287
eZContentObjectAttribute\toString
toString()
Definition: ezcontentobjectattribute.php:1171
eZContentObjectAttribute\fetchSameClassAttributeIDList
static fetchSameClassAttributeIDList( $contentClassAttributeID, $asObject=true, $version=false, $contentObjectID=false, $limit=null)
Definition: ezcontentobjectattribute.php:205
eZContentObjectAttribute\isA
isA()
Definition: ezcontentobjectattribute.php:1380
eZContentObjectAttribute\removeRelationsByContentClassAttributeId
static removeRelationsByContentClassAttributeId( $attributeId)
Definition: ezcontentobjectattribute.php:1494
eZContentObjectVersion\fetchVersion
static fetchVersion( $version, $contentObjectID, $asObject=true)
Definition: ezcontentobjectversion.php:166
eZContentObject\defaultLanguage
static defaultLanguage()
Definition: ezcontentobject.php:5330
eZContentObject\fetch
static fetch( $id, $asObject=true)
Definition: ezcontentobject.php:885
eZDB\instance
static instance( $databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Definition: ezdb.php:117
eZDataType\create
static create( $dataTypeString)
Definition: ezdatatype.php:151
eZDebug\accumulatorStart
static accumulatorStart( $key, $inGroup=false, $name=false, $recursive=false)
Definition: ezdebug.php:1361
eZDebug\accumulatorStop
static accumulatorStop( $key, $recursive=false)
Definition: ezdebug.php:1389
eZPersistentObject
Definition: ezpersistentobject.php:33
eZPersistentObject\fetchObject
static fetchObject( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
Definition: ezpersistentobject.php:213
eZPersistentObject\removeObject
static removeObject( $def, $conditions=null, $extraConditions=null)
Definition: ezpersistentobject.php:271
eZPersistentObject\setAttribute
setAttribute( $attr, $val)
Definition: ezpersistentobject.php:1374
eZPersistentObject\fetchObjectList
static fetchObjectList( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
Definition: ezpersistentobject.php:806
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.