1 | <?php |
||
5 | class Helpers |
||
6 | { |
||
7 | /** |
||
8 | * Does the $haystack starts with $needle |
||
9 | * |
||
10 | * @param $haystack |
||
11 | * @param $needle |
||
12 | * @return bool |
||
13 | */ |
||
14 | public static function startsWith($haystack, $needle) |
||
18 | |||
19 | /** |
||
20 | * @param Collection|BaseBitrixModel[] $primaryModels первичные модели |
||
21 | * @param Collection|BaseBitrixModel[] $relationModels подгруженные связанные модели |
||
22 | * @param string $primaryKey ключ связи в первичной модели |
||
23 | * @param string $relationKey ключ связи в связанной модели |
||
24 | * @param string $relationName название связи в первичной модели |
||
25 | * @param bool $multiple множественная ли это свзязь |
||
26 | */ |
||
27 | public static function assocModels($primaryModels, $relationModels, $primaryKey, $relationKey, $relationName, $multiple) |
||
48 | |||
49 | /** |
||
50 | * Сгруппировать найденные модели |
||
51 | * @param array $models |
||
52 | * @param string $linkKey |
||
53 | * @param bool $multiple |
||
54 | * @return array |
||
55 | */ |
||
56 | protected static function buildBuckets($models, $linkKey, $multiple) |
||
83 | |||
84 | /** |
||
85 | * @param mixed $value raw key value. |
||
86 | * @return string normalized key value. |
||
87 | */ |
||
88 | protected static function normalizeModelKey($value) |
||
97 | } |
||
98 |