32 public function __construct($id, array $initParams, $currency, $value =
null, array $additionalParams = array())
39 $initParams[
'CODE'] ??=
'';
40 $initParams[
'NAME'] ??=
'';
41 $initParams[
'DESCRIPTION'] ??=
null;
42 $initParams[
'PARAMS'] ??= [];
43 if (!is_array($initParams[
'PARAMS']))
45 $initParams[
'PARAMS'] = [];
47 $initParams[
'DELIVERY_ID'] ??=
null;
48 $initParams[
'INIT_VALUE'] ??=
null;
49 $initParams[
'ACTIVE'] = (string)($initParams[
'ACTIVE'] ??
'N');
50 $initParams[
'SORT'] ??=
null;
53 $this->code = $initParams[
'CODE'];
54 $this->name = $initParams[
'NAME'];
55 $this->description = $initParams[
'DESCRIPTION'];
56 $this->className = $initParams[
'CLASS_NAME'];
57 $this->params = $initParams[
'PARAMS'];
58 $this->rights = $initParams[
'RIGHTS'];
59 $this->deliveryId = $initParams[
'DELIVERY_ID'];
60 $this->initial = $initParams[
'INIT_VALUE'];
61 $this->active = $initParams[
'ACTIVE'];
62 $this->sort = $initParams[
'SORT'];
71 elseif ($this->initial !==
null)