Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
SpaceSearchDataCollection.php
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Space\List\RecentSearch
;
4
5
use
Bitrix\Main\Type\Contract\Arrayable
;
6
7
final
class
SpaceSearchDataCollection
implements
Arrayable
8
{
9
11
private
array $items = [];
12
13
public
function
add
(
SpaceSearchData
$spaceSearchData): void
14
{
15
$this->items[] = $spaceSearchData;
16
}
17
18
public
function
toArray
(): array
19
{
20
return
$this->items;
21
}
22
23
public
function
getSpaceSearchDataBySpacesId
(
int
$spaceId): ?
SpaceSearchData
24
{
25
$result =
null
;
26
foreach
($this->items as $item)
27
{
28
if
($spaceId === $item->getSpaceId())
29
{
30
$result = $item;
31
break
;
32
}
33
}
34
35
return
$result;
36
}
37
}
Bitrix\Socialnetwork\Space\List\RecentSearch\SpaceSearchDataCollection
Definition
SpaceSearchDataCollection.php:8
Bitrix\Socialnetwork\Space\List\RecentSearch\SpaceSearchDataCollection\add
add(SpaceSearchData $spaceSearchData)
Definition
SpaceSearchDataCollection.php:13
Bitrix\Socialnetwork\Space\List\RecentSearch\SpaceSearchDataCollection\toArray
toArray()
Definition
SpaceSearchDataCollection.php:18
Bitrix\Socialnetwork\Space\List\RecentSearch\SpaceSearchDataCollection\getSpaceSearchDataBySpacesId
getSpaceSearchDataBySpacesId(int $spaceId)
Definition
SpaceSearchDataCollection.php:23
Bitrix\Socialnetwork\Space\List\RecentSearch\SpaceSearchData
Definition
SpaceSearchData.php:8
Bitrix\Main\Type\Contract\Arrayable
Definition
arrayable.php:6
Bitrix\Socialnetwork\Space\List\RecentSearch
Definition
RecentSearchManager.php:2
modules
socialnetwork
lib
Space
List
RecentSearch
SpaceSearchDataCollection.php
Создано системой
1.10.0