Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
base.php
1<?php
2
4
5use \Bitrix\Sale\Delivery\Services;
7
14abstract class Base
15{
17 protected $params;
20
25 public function __construct(array $params, Services\Base $deliveryService)
26 {
27 $this->params = $params;
28 $this->deliveryService = $deliveryService;
29 }
30
35 abstract public function getClassTitle();
36
41 abstract public function getClassDescription();
42
47 public function getStatus($trackingNumber)
48 {
49 return new StatusResult();
50 }
51
56 public function getStatusShipment($shipmentData)
57 {
58 return $this->getStatus($shipmentData['TRACKING_NUMBER']);
59 }
60
65 public function getStatuses(array $trackingNumbers)
66 {
67 return new Result();
68 }
69
74 public function getStatusesShipment(array $shipmentsData)
75 {
76 $trackingNumbers = array_keys($shipmentsData);
77 return $this->getStatuses($trackingNumbers);
78 }
79
84 abstract public function getParamsStructure();
85
92 public function getEditHtml($paramKey, $inputName)
93 {
94 $paramsStructure = $this->getParamsStructure();
95
96 return \Bitrix\Sale\Internals\Input\Manager::getEditHtml(
97 $inputName,
98 $paramsStructure[$paramKey],
99 $this->params[$paramKey] ?? null
100 );
101 }
102
107 public function getTrackingUrl($trackingNumber = '')
108 {
109 return '';
110 }
111}
getStatusShipment($shipmentData)
Definition base.php:56
getStatusesShipment(array $shipmentsData)
Definition base.php:74
__construct(array $params, Services\Base $deliveryService)
Definition base.php:25
getEditHtml($paramKey, $inputName)
Definition base.php:92
getTrackingUrl($trackingNumber='')
Definition base.php:107
getStatuses(array $trackingNumbers)
Definition base.php:65
getStatus($trackingNumber)
Definition base.php:47