Skip to content

Commit 2984b10

Browse files
committed
Add ElementList stubs
1 parent 24cc98a commit 2984b10

File tree

2 files changed

+308
-1
lines changed

2 files changed

+308
-1
lines changed

bitrix-stubs/bitrix/modules/iblock/lib/component/base.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,14 @@ protected function getOffersSort(): array
942942
protected function modifyOffers(array $offers): void
943943
{ }
944944

945-
abstract protected function chooseOffer(array $offers, int $iblockId);
945+
/**
946+
* Undocumented function
947+
*
948+
* @param array $offers
949+
* @param integer $iblockId
950+
* @return void
951+
*/
952+
abstract protected function chooseOffer(array $offers, int $iblockId): void;
946953

947954
/**
948955
* Undocumented function
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
<?php
2+
3+
namespace Bitrix\Iblock\Component;
4+
5+
6+
abstract class ElementList extends Base
7+
{
8+
9+
protected $navigation = false;
10+
protected $pagerParameters = array();
11+
12+
/**
13+
* Multi iblock mode setter.
14+
* Enable it if you use data from different iblocks.
15+
*
16+
* @param boolean $state
17+
* @return $this
18+
*/
19+
protected function setMultiIblockMode(bool $state): self
20+
{
21+
return $this;
22+
}
23+
24+
/**
25+
* Return if multi iblock mode enabled.
26+
*
27+
* @return boolean
28+
*/
29+
public function isMultiIblockMode(): bool
30+
{
31+
return false;
32+
}
33+
34+
/**
35+
* Return if pagination mode enabled.
36+
*
37+
* @return boolean
38+
*/
39+
public function isPaginationMode(): bool
40+
{
41+
return false;
42+
}
43+
44+
/**
45+
* Undocumented function
46+
*
47+
* @param array $params
48+
* @param array $orderRow
49+
* @param array $default
50+
* @return array
51+
*/
52+
protected function prepareElementSortRow(array $params, array $orderRow, array $default): array
53+
{
54+
return [];
55+
}
56+
57+
/**
58+
* Undocumented function
59+
*
60+
* @param array $variants
61+
* @param boolean $isBigData
62+
* @return integer
63+
*/
64+
protected static function predictElementCountByVariants(array $variants, bool $isBigData = false): int
65+
{
66+
return 0;
67+
}
68+
69+
/**
70+
* Undocumented function
71+
*
72+
* @param array $params
73+
* @return void
74+
*/
75+
protected function getPaginationParams(array &$params): void
76+
{ }
77+
78+
/**
79+
* Undocumented function
80+
*
81+
* @param array $params
82+
* @return void
83+
*/
84+
protected function getSpecificIblockParams(array &$params): void
85+
{ }
86+
87+
/**
88+
* Process iblock component parameters for single iblock with disabled multi-iblock-mode.
89+
*
90+
* @param array $params
91+
* @return array
92+
*/
93+
protected function getMultiIblockParams(array &$params): array
94+
{
95+
return [];
96+
}
97+
98+
/**
99+
* Process iblock component parameters for single iblock with disabled multi-iblock-mode.
100+
*
101+
* @param $params
102+
* @return array
103+
*/
104+
protected function getSingleIblockParams(array &$params): array
105+
{
106+
return [];
107+
}
108+
109+
/**
110+
* some logic of \CComponentAjax to execute in component_epilog
111+
*
112+
* @param string $data
113+
* @return void
114+
*/
115+
public function prepareLinks(string &$data): void
116+
{ }
117+
118+
/**
119+
* Undocumented function
120+
*
121+
* @return void
122+
*/
123+
protected function initSubQuery(): void
124+
{ }
125+
126+
/**
127+
* Undocumented function
128+
*
129+
* @param \CIBlockResult $elementIterator
130+
* @return void
131+
*/
132+
protected function initNavString(\CIBlockResult $elementIterator): void
133+
{ }
134+
135+
/**
136+
* Undocumented function
137+
*
138+
* @param integer $iblockId
139+
* @return array
140+
*/
141+
protected function getFilteredOffersByProperty(int $iblockId): array
142+
{
143+
return [];
144+
}
145+
146+
/**
147+
* Undocumented function
148+
*
149+
* @param array $level
150+
* @return array
151+
*/
152+
protected function getOffersPropFilter(array $level): array
153+
{
154+
return [];
155+
}
156+
157+
/**
158+
* Undocumented function
159+
*
160+
* @return void
161+
*/
162+
protected function prepareDeferredParams(): void
163+
{ }
164+
165+
/**
166+
* Initialization of page navigation parameters.
167+
*
168+
* @return void
169+
*/
170+
protected function initNavParams(): void
171+
{ }
172+
173+
/**
174+
* Undocumented function
175+
*
176+
* @param string $jsonString
177+
* @return array
178+
*/
179+
protected static function parseJsonParameter(string $jsonString): array
180+
{
181+
return [];
182+
}
183+
184+
/**
185+
* Process iblock template parameters for multi iblock mode.
186+
*
187+
* @param array $params
188+
*/
189+
protected function getTemplateMultiIblockParams(array &$params): void
190+
{ }
191+
192+
/**
193+
* Process iblock template parameters for single iblock with disabled multi-iblock-mode.
194+
*
195+
* @param array $params
196+
*/
197+
protected function getTemplateSingleIblockParams(array &$params): void
198+
{ }
199+
200+
public static function getDefaultVariantId(): int
201+
{
202+
return 0;
203+
}
204+
205+
/**
206+
* Undocumented function
207+
*
208+
* @param integer $lineElementCount
209+
* @param integer $pageElementCount
210+
* @return array
211+
*/
212+
public static function predictRowVariants(int $lineElementCount, int $pageElementCount): array
213+
{
214+
return [];
215+
}
216+
217+
/**
218+
* Creating sequence of variants to show
219+
*
220+
* @return void
221+
*/
222+
protected function sortItemsByTemplateVariants(): void
223+
{ }
224+
225+
/**
226+
* Return array of big data settings.
227+
*
228+
* @return array
229+
*/
230+
protected function getBigDataInfo(): array
231+
{
232+
return [];
233+
}
234+
235+
/**
236+
* getting positions of enlarged elements
237+
*
238+
* @return array
239+
*/
240+
protected function getEnlargedIndexMap(): array
241+
{
242+
return [];
243+
}
244+
245+
/**
246+
* Undocumented function
247+
*
248+
* @return array
249+
*/
250+
public static function getTemplateVariantsMap(): array
251+
{
252+
return [];
253+
}
254+
255+
/**
256+
* Undocumented function
257+
*
258+
* @return array
259+
*/
260+
public function getTemplateSkuPropList(): array
261+
{
262+
return [];
263+
}
264+
265+
/**
266+
* Undocumented function
267+
*
268+
* @param array $items
269+
* @return void
270+
*/
271+
protected function editTemplateItems(array &$items): void
272+
{ }
273+
274+
/**
275+
* Undocumented function
276+
*
277+
* @param array $item
278+
* @return void
279+
*/
280+
protected function editTemplateProductPictures(array &$item): void
281+
{ }
282+
283+
/**
284+
* Undocumented function
285+
*
286+
* @param array $item
287+
* @return void
288+
*/
289+
protected function editTemplateJsOffers(array &$item): void
290+
{ }
291+
292+
/**
293+
* Undocumented function
294+
*
295+
* @param array $item
296+
* @return void
297+
*/
298+
protected function editTemplateOfferProps(array &$item): void
299+
{ }
300+
}

0 commit comments

Comments
 (0)