11
11
use Ibexa \Contracts \Core \Persistence \Content \CreateStruct ;
12
12
use Ibexa \Contracts \Core \Persistence \Content \Handler as SPIContentHandler ;
13
13
use Ibexa \Contracts \Core \Persistence \Content \MetadataUpdateStruct ;
14
+ use Ibexa \Contracts \Core \Persistence \Content \Relation ;
14
15
use Ibexa \Contracts \Core \Persistence \Content \Relation as SPIRelation ;
15
16
use Ibexa \Contracts \Core \Persistence \Content \Relation \CreateStruct as RelationCreateStruct ;
16
17
use Ibexa \Contracts \Core \Persistence \Content \UpdateStruct ;
@@ -82,6 +83,13 @@ public function providerForCachedLoadMethodsHit(): array
82
83
$ info = new ContentInfo (['id ' => 2 ]);
83
84
$ version = new VersionInfo (['versionNo ' => 1 , 'contentInfo ' => $ info ]);
84
85
$ content = new Content (['fields ' => [], 'versionInfo ' => $ version ]);
86
+ $ relation = new Relation ();
87
+ $ relation ->id = 1 ;
88
+ $ relation ->sourceContentId = 2 ;
89
+ $ relation ->sourceContentVersionNo = 2 ;
90
+ $ relation ->destinationContentId = 1 ;
91
+ $ relation ->type = 1 ;
92
+ $ relationList [1 ] = $ relation ;
85
93
86
94
// string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi = false, array $additionalCalls
87
95
return [
@@ -90,6 +98,10 @@ public function providerForCachedLoadMethodsHit(): array
90
98
['countRelations ' , [2 , 2 ], 'ibx-crc-2-v-2 ' , null , null , [['content_relations_count_with_version ' , [2 , 2 ], true ]], ['ibx-crc-2-v-2 ' ], 10 ],
91
99
['countRelations ' , [2 , null , 1 ], 'ibx-crc-2-t-1 ' , null , null , [['content_relations_count_with_type ' , [2 , 1 ], true ]], ['ibx-crc-2-t-1 ' ], 10 ],
92
100
['countRelations ' , [2 , 2 , 1 ], 'ibx-crc-2-t-1-v-2 ' , null , null , [['content_relations_count_with_type_and_version ' , [2 , 1 , 2 ], true ]], ['ibx-crc-2-t-1-v-2 ' ], 10 ],
101
+ ['loadRelationList ' , [2 , 1 , 0 ], 'ibx-crl-2-l-1-o-0 ' , null , null , [['content_relations_list ' , [2 , 1 , 0 ], true ]], ['ibx-crl-2-l-1-o-0 ' ], $ relationList ],
102
+ ['loadRelationList ' , [2 , 1 , 0 , 2 ], 'ibx-crl-2-l-1-o-0-v-2 ' , null , null , [['content_relations_list_with_version ' , [2 , 1 , 0 , 2 ], true ]], ['ibx-crl-2-l-1-o-0-v-2 ' ], $ relationList ],
103
+ ['loadRelationList ' , [2 , 1 , 0 , null , 1 ], 'ibx-crl-2-l-1-o-0-t-1 ' , null , null , [['content_relations_list_with_type ' , [2 , 1 , 0 , 1 ], true ]], ['ibx-crl-2-l-1-o-0-t-1 ' ], $ relationList ],
104
+ ['loadRelationList ' , [2 , 1 , 0 , 2 , 1 ], 'ibx-crl-2-l-1-o-0-t-1-v-2 ' , null , null , [['content_relations_list_with_type_and_version ' , [2 , 1 , 0 , 1 , 2 ], true ]], ['ibx-crl-2-l-1-o-0-t-1-v-2 ' ], $ relationList ],
93
105
['load ' , [2 , 1 ], 'ibx-c-2-1- ' . ContentHandler::ALL_TRANSLATIONS_KEY , null , null , [['content ' , [], true ]], ['ibx-c ' ], $ content ],
94
106
['load ' , [2 , 1 , ['eng-GB ' , 'eng-US ' ]], 'ibx-c-2-1-eng-GB|eng-US ' , null , null , [['content ' , [], true ]], ['ibx-c ' ], $ content ],
95
107
['load ' , [2 ], 'ibx-c-2- ' . ContentHandler::ALL_TRANSLATIONS_KEY , null , null , [['content ' , [], true ]], ['ibx-c ' ], $ content ],
0 commit comments