1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
PropertyFeatureRepository.php
См. документацию.
1<?php
2
3namespace Bitrix\Catalog\v2\PropertyFeature;
4
5use Bitrix\Catalog\v2\BaseEntity;
6use Bitrix\Catalog\v2\Property\Property;
7use Bitrix\Iblock\PropertyFeatureTable;
8use Bitrix\Main\Result;
9
19{
21 protected $factory;
22
24 {
25 $this->factory = $factory;
26 }
27
28 public function getEntityById(int $id)
29 {
30 return $this->getEntitiesBy([
31 'filter' => ['=ID' => $id],
32 'limit' => 1,
33 ]);
34 }
35
36 public function getEntitiesBy($params)
37 {
38 return PropertyFeatureTable::getList($params)->fetchAll();
39 }
40
41 public function save(BaseEntity ...$entities): Result
42 {
43 return new Result();
44 }
45
46 public function delete(BaseEntity ...$entities): Result
47 {
48 return new Result();
49 }
50
52 {
53 $collection = $this->factory->createCollection();
54
55 $featureSettings = $this->getEntitiesBy([
56 'filter' => ['=PROPERTY_ID' => $entity->getId()],
57 ]);
58
59 foreach ($featureSettings as $settings)
60 {
61 $feature = $this->createEntity();
62 $feature->setSettings($settings);
63 $collection->add($feature);
64 }
65
66 return $collection;
67 }
68
69 protected function createEntity(array $fields = []): PropertyFeature
70 {
71 $entity = $this->factory->createEntity();
72
73 $entity->initFields($fields);
74
75 return $entity;
76 }
77}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$entity
$settings
Определения product_settings.php:43
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$fields
Определения yandex_run.php:501