21
21
*/
22
22
abstract class Gateway
23
23
{
24
- public const CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE = 'ezcontentclass_classgroup ' ;
25
- public const CONTENT_TYPE_GROUP_TABLE = 'ezcontentclassgroup ' ;
26
- public const CONTENT_TYPE_TABLE = 'ezcontentclass ' ;
27
- public const CONTENT_TYPE_NAME_TABLE = 'ezcontentclass_name ' ;
28
- public const FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute ' ;
29
- public const MULTILINGUAL_FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute_ml ' ;
24
+ public const string CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE = 'ezcontentclass_classgroup ' ;
25
+ public const string CONTENT_TYPE_GROUP_TABLE = 'ezcontentclassgroup ' ;
26
+ public const string CONTENT_TYPE_TABLE = 'ezcontentclass ' ;
27
+ public const string CONTENT_TYPE_NAME_TABLE = 'ezcontentclass_name ' ;
28
+ public const string FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute ' ;
29
+ public const string MULTILINGUAL_FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute_ml ' ;
30
30
31
- public const CONTENT_TYPE_GROUP_SEQ = 'ezcontentclassgroup_id_seq ' ;
32
- public const CONTENT_TYPE_SEQ = 'ezcontentclass_id_seq ' ;
33
- public const FIELD_DEFINITION_SEQ = 'ezcontentclass_attribute_id_seq ' ;
31
+ public const string CONTENT_TYPE_GROUP_SEQ = 'ezcontentclassgroup_id_seq ' ;
32
+ public const string CONTENT_TYPE_SEQ = 'ezcontentclass_id_seq ' ;
33
+ public const string FIELD_DEFINITION_SEQ = 'ezcontentclass_attribute_id_seq ' ;
34
34
35
35
abstract public function insertGroup (Group $ group ): int ;
36
36
@@ -44,15 +44,25 @@ abstract public function deleteGroup(int $groupId): void;
44
44
45
45
/**
46
46
* @param int[] $groupIds
47
+ *
48
+ * @phpstan-return list<array<string,mixed>>
47
49
*/
48
50
abstract public function loadGroupData (array $ groupIds ): array ;
49
51
52
+ /**
53
+ * @phpstan-return list<array<string,mixed>>
54
+ */
50
55
abstract public function loadGroupDataByIdentifier (string $ identifier ): array ;
51
56
57
+ /**
58
+ * @phpstan-return list<array<string,mixed>>
59
+ */
52
60
abstract public function loadAllGroupsData (): array ;
53
61
54
62
/**
55
63
* Load data for all content types of the given status, belonging to the given Group.
64
+ *
65
+ * @phpstan-return list<array<string,mixed>>
56
66
*/
57
67
abstract public function loadTypesDataForGroup (int $ groupId , int $ status ): array ;
58
68
@@ -76,6 +86,8 @@ abstract public function deleteGroupAssignment(int $groupId, int $typeId, int $s
76
86
/**
77
87
* @param int $id Field Definition ID
78
88
* @param int $status One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED
89
+ *
90
+ * @phpstan-return list<array<string,mixed>>
79
91
*/
80
92
abstract public function loadFieldDefinition (int $ id , int $ status ): array ;
81
93
@@ -113,18 +125,31 @@ abstract public function updateType(int $typeId, int $status, Type $type): void;
113
125
* Bulk-load an array with data about the given content types.
114
126
*
115
127
* @param int[] $typeIds
128
+ *
129
+ * @phpstan-return list<array<string,mixed>>
116
130
*/
117
131
abstract public function loadTypesListData (array $ typeIds ): array ;
118
132
119
133
/**
120
134
* @return array<mixed>
135
+ *
136
+ * @phpstan-return list<array<string,mixed>>
121
137
*/
122
138
abstract public function loadTypesDataByFieldDefinitionIdentifier (string $ identifier ): array ;
123
139
140
+ /**
141
+ * @phpstan-return list<array<string,mixed>>
142
+ */
124
143
abstract public function loadTypeData (int $ typeId , int $ status ): array ;
125
144
145
+ /**
146
+ * @phpstan-return list<array<string,mixed>>
147
+ */
126
148
abstract public function loadTypeDataByIdentifier (string $ identifier , int $ status ): array ;
127
149
150
+ /**
151
+ * @phpstan-return list<array<string,mixed>>
152
+ */
128
153
abstract public function loadTypeDataByRemoteId (string $ remoteId , int $ status ): array ;
129
154
130
155
abstract public function countInstancesOfType (int $ typeId ): int ;
@@ -154,6 +179,9 @@ abstract public function publishTypeAndFields(
154
179
int $ targetStatus
155
180
): void ;
156
181
182
+ /**
183
+ * @phpstan-return list<array<string,mixed>>
184
+ */
157
185
abstract public function getSearchableFieldMapData (): array ;
158
186
159
187
/**
0 commit comments