[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 *Title: Improvements to related objects added from XML block text field. 2 3 * Back-compatibility and upgrading 4 5 This feature is enabled only if the next setting is 'enabled': 6 site.ini:[BackwardCompatibilitySettings].ObjectRelationTyped 7 8 Before using this feature please run upgrade script: 9 update/common/scripts/3.9/updatetypedrelation.php 10 11 *Documentation: 12 13 There are 4 types of relations between objects in the system: 14 15 - 'Common'. Relations of common type are created when user adds related 16 objects manually. 17 18 - 'XML linked'. Relations of this type are added automatically when you 19 save object containing XML fields with <link> tags referencing objects or nodes 20 (ex: <link href='ezobject://123>... ). Note that when you remove <link> tag 21 and store object, the corresponding relation will be automatically removed. 22 23 - 'XML embedded'. Relations of this type are added automatically when you save 24 object containing XML fields with <embed> tags embedding objects or nodes. 25 Note that when you remove <embed> tag and store object, the corresponding 26 relation will be automatically removed. 27 28 - 'by Attribute'. Relations made by attributes of "Object relation" and 29 "Object relation list" datatypes. 30 31 32 *Template fetch functions: 33 34 The following fetch functions have been modified: related_objects, 35 related_objects_count, reverse_related_objects, reverse_related_objects_count. 36 37 Parameter 'all_relations' now has mixed type. It could be boolean true/false 38 like it was in 3.8, but it can be also an array. Array may consists of the 39 following strings: 'common', 'xml_link', 'xml_embed', 'attribute'. Each of 40 them mean corresponding relation type. Types can be mixed and placed in any 41 order. Also this new parameter is fully compatible with other options. 42 43 Also the following functional attributes has been added to ezcontentobject 44 class: 45 46 linked_contentobject_array 47 embedded_contentobject_array 48 reverse_embedded_contentobject_array 49 reverse_linked_contentobject_array 50 51 They act like corresponding fetch functions return all related or reverse-related 52 objects of a specific type. 53 54 *Examples: 55 56 Both examples return array of objects "linked" to the object $my_object. 57 58 {def $linked = fetch( 'content', 'related_objects', hash( 'object_id', $my_object.id, 'all_relations', array( 'xml_link' ) ) )} 59 60 {def $linked = $my_object.linked_contentobject_array}
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |