Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
collection.php
1
<?php
2
3
namespace
Bitrix\Sale\Discount\Gift
;
4
5
6
use
Bitrix\Main\Type\Dictionary
;
7
8
class
Collection
extends
Dictionary
9
{
10
public
const
TYPE_GRANT_ALL
=
'all'
;
11
public
const
TYPE_GRANT_ONE
=
'one'
;
12
13
protected
$type
= self::TYPE_GRANT_ONE;
14
20
public
function
__construct
(array $gifts, $type)
21
{
22
$this->type =
$type
;
23
24
parent::__construct($gifts);
25
}
26
27
protected
function
setGift
(
Gift
$gift, $offset =
null
)
28
{
29
parent::offsetSet($offset, $gift);
30
}
31
32
public
function
offsetSet
($offset, $value)
33
{
34
$this->
setGift
($value, $offset);
35
}
36
37
public
function
getGrantType
(): string
38
{
39
return
$this->type;
40
}
41
}
Bitrix\Main\ORM\Objectify\Collection
Definition
collection.php:33
Bitrix\Main\Type\Dictionary
Definition
dictionary.php:6
Bitrix\Sale\Discount\Gift\Collection\getGrantType
getGrantType()
Definition
collection.php:37
Bitrix\Sale\Discount\Gift\Collection\TYPE_GRANT_ONE
const TYPE_GRANT_ONE
Definition
collection.php:11
Bitrix\Sale\Discount\Gift\Collection\$type
$type
Definition
collection.php:13
Bitrix\Sale\Discount\Gift\Collection\__construct
__construct(array $gifts, $type)
Definition
collection.php:20
Bitrix\Sale\Discount\Gift\Collection\offsetSet
offsetSet($offset, $value)
Definition
collection.php:32
Bitrix\Sale\Discount\Gift\Collection\TYPE_GRANT_ALL
const TYPE_GRANT_ALL
Definition
collection.php:10
Bitrix\Sale\Discount\Gift\Collection\setGift
setGift(Gift $gift, $offset=null)
Definition
collection.php:27
Bitrix\Sale\Discount\Gift\Gift
Definition
gift.php:7
Bitrix\Sale\Discount\Gift
Definition
collection.php:3
modules
sale
lib
discount
gift
collection.php
Создано системой
1.10.0