Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
storeitem.php
1<?php
3
4use Bitrix\Catalog\EO_StoreBatch;
6
12final class StoreItem implements InventoryTreeItem
13{
14 private EO_StoreBatch $batch;
15 private string $hash;
16 public function __construct(EO_StoreBatch $batch)
17 {
18 $this->batch = $batch;
19
20 $this->hash = md5(uniqid(rand(), true));
21 }
22 public function getStoreBatch(): ?EO_StoreBatch
23 {
24 return $this->batch;
25 }
26
27 public function getHash(): string
28 {
29 return $this->hash;
30 }
31
32 public function save(): Result
33 {
34 return $this->batch->save();
35 }
36}