1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
MemberCollection.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
6
9
14{
15 public static function getRestEntityName(): string
16 {
17 return 'members';
18 }
19
20 public static function initByRawResult(array $rawResult): static
21 {
22 $collection = new static();
23
24 foreach ($rawResult as $row)
25 {
26 $collection[] = new MemberItem((int)$row['ID'], (int)$row['USER_ID'], $row['ROLE']);
27 }
28
29 return $collection;
30 }
31
32 public function getNextCursor(int $limit): ?MemberCursor
33 {
34 if ($this->count() < $limit)
35 {
36 return null;
37 }
38
39 $maxRole = null;
40 $maxRolePriority = 0;
41 $maxId = 0;
42
43 foreach ($this as $item)
44 {
45 $rolePriority = MemberProvider::ROLE_PRIORITY_MAP[$item->getRole()];
46 if ($rolePriority > $maxRolePriority)
47 {
48 $maxRole = $item->getRole();
49 $maxRolePriority = $rolePriority;
50 $maxId = $item->getId();
51 }
52 if ($item->getId() > $maxId)
53 {
54 $maxId = $item->getId();
55 }
56 }
57
58 if ($maxRole === null || $maxId === null)
59 {
60 return null;
61 }
62
63 return new MemberCursor($maxRole, $maxId);
64 }
65}
static initByRawResult(array $rawResult)
Определения MemberCollection.php:20
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936