Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
provider.php
1<?php
2
4
6
12final class Provider extends Analytics\Provider
13{
15 private $code;
16
18 private $orders;
19
24 public function __construct(string $code, array $orders)
25 {
26 $this->code = $code;
27 $this->orders = $orders;
28 }
29
33 public static function getCode(): string
34 {
35 return 'delivery';
36 }
37
41 protected function needProvideData(): bool
42 {
43 return true;
44 }
45
49 protected function getProviderData(): array
50 {
51 if (!$this->orders)
52 {
53 return [];
54 }
55
56 return [
57 'delivery' => $this->code,
58 'orders' => $this->orders,
59 ];
60 }
61}
__construct(string $code, array $orders)
Definition provider.php:24