Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
PriceFactory.php
1
<?php
2
3
namespace
Bitrix\Catalog\v2\Price
;
4
5
use
Bitrix\Catalog\v2\IoC\ContainerContract
;
6
15
class
PriceFactory
16
{
17
public
const
SIMPLE_PRICE
= SimplePrice::class;
18
public
const
QUANTITY_DEPENDENT_PRICE
= QuantityDependentPrice::class;
19
public
const
PRICE_COLLECTION
= PriceCollection::class;
20
21
protected
$container
;
22
28
public
function
__construct
(
ContainerContract
$container
)
29
{
30
$this->container =
$container
;
31
}
32
36
public
function
createEntity
():
BasePrice
37
{
38
// $price = $this->container->make(self::QUANTITY_DEPENDENT_PRICE);
39
return
$this->container->make(self::SIMPLE_PRICE);
40
}
41
45
public
function
createCollection
():
PriceCollection
46
{
47
return
$this->container->make(self::PRICE_COLLECTION);
48
}
49
}
Bitrix\Catalog\v2\Price\BasePrice
Definition
BasePrice.php:18
Bitrix\Catalog\v2\Price\PriceCollection
Definition
PriceCollection.php:16
Bitrix\Catalog\v2\Price\PriceFactory
Definition
PriceFactory.php:16
Bitrix\Catalog\v2\Price\PriceFactory\createEntity
createEntity()
Definition
PriceFactory.php:36
Bitrix\Catalog\v2\Price\PriceFactory\PRICE_COLLECTION
const PRICE_COLLECTION
Definition
PriceFactory.php:19
Bitrix\Catalog\v2\Price\PriceFactory\__construct
__construct(ContainerContract $container)
Definition
PriceFactory.php:28
Bitrix\Catalog\v2\Price\PriceFactory\SIMPLE_PRICE
const SIMPLE_PRICE
Definition
PriceFactory.php:17
Bitrix\Catalog\v2\Price\PriceFactory\$container
$container
Definition
PriceFactory.php:21
Bitrix\Catalog\v2\Price\PriceFactory\createCollection
createCollection()
Definition
PriceFactory.php:45
Bitrix\Catalog\v2\Price\PriceFactory\QUANTITY_DEPENDENT_PRICE
const QUANTITY_DEPENDENT_PRICE
Definition
PriceFactory.php:18
Bitrix\Catalog\v2\IoC\ContainerContract
Definition
ContainerContract.php:15
Bitrix\Catalog\v2\Price
Definition
BasePrice.php:3
modules
catalog
lib
v2
Price
PriceFactory.php
Создано системой
1.10.0