Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
PropertyFeatureCollection.php
1
<?php
2
3
namespace
Bitrix\Catalog\v2\PropertyFeature
;
4
5
use
Bitrix\Catalog\v2\BaseCollection
;
6
use
Bitrix\Main\Result
;
7
16
class
PropertyFeatureCollection
extends
BaseCollection
17
{
19
protected
$repository
;
20
21
public
function
__construct
(
PropertyFeatureRepositoryContract
$repository
)
22
{
23
$this->repository =
$repository
;
24
}
25
26
public
function
findBySetting(
string
$field, $value): ?
PropertyFeature
27
{
29
foreach
($this->
getIterator
() as $item)
30
{
31
if
($item->getSetting($field) === $value)
32
{
33
return
$item;
34
}
35
}
36
37
return
null
;
38
}
39
40
public
function
findByFeatureId(
string
$featureId): ?PropertyFeature
41
{
43
foreach
($this->
getIterator
() as $item)
44
{
45
if
($item->getFeatureId() === $featureId)
46
{
47
return
$item;
48
}
49
}
50
51
return
null
;
52
}
53
54
public
function
saveInternal
():
Result
55
{
56
return
new
Result
();
57
}
58
59
public
function
deleteInternal
():
Result
60
{
61
return
new
Result
();
62
}
63
}
Bitrix\Catalog\v2\BaseCollection
Definition
BaseCollection.php:17
Bitrix\Catalog\v2\BaseCollection\getIterator
getIterator()
Definition
BaseCollection.php:252
Bitrix\Catalog\v2\PropertyFeature\PropertyFeatureCollection
Definition
PropertyFeatureCollection.php:17
Bitrix\Catalog\v2\PropertyFeature\PropertyFeatureCollection\$repository
$repository
Definition
PropertyFeatureCollection.php:19
Bitrix\Catalog\v2\PropertyFeature\PropertyFeatureCollection\__construct
__construct(PropertyFeatureRepositoryContract $repository)
Definition
PropertyFeatureCollection.php:21
Bitrix\Catalog\v2\PropertyFeature\PropertyFeatureCollection\deleteInternal
deleteInternal()
Definition
PropertyFeatureCollection.php:59
Bitrix\Catalog\v2\PropertyFeature\PropertyFeatureCollection\saveInternal
saveInternal()
Definition
PropertyFeatureCollection.php:54
Bitrix\Catalog\v2\PropertyFeature\PropertyFeature
Definition
PropertyFeature.php:17
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\Result
Definition
result.php:14
Bitrix\Catalog\v2\PropertyFeature\PropertyFeatureRepositoryContract
Definition
PropertyFeatureRepositoryContract.php:17
Bitrix\Catalog\v2\PropertyFeature
Definition
HasPropertyFeatureCollection.php:3
modules
catalog
lib
v2
PropertyFeature
PropertyFeatureCollection.php
Создано системой
1.10.0