1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
PriceFactory.php
См. документацию.
1<?php
2
3namespace Bitrix\Catalog\v2\Price;
4
5use Bitrix\Catalog\v2\IoC\ContainerContract;
6
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
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
46 {
47 return $this->container->make(self::PRICE_COLLECTION);
48 }
49}
__construct(ContainerContract $container)
Определения PriceFactory.php:28