Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
usertypeutsmultiplefield.php
1<?php
10
16{
18 protected $utmField;
19
25 {
26 $this->utmField = $utmField;
27
28 return $this;
29 }
30
34 public function getUtmField()
35 {
36 return $this->utmField;
37 }
38
42 public function getFetchDataModifiers()
43 {
44 $modifiers = parent::getFetchDataModifiers();
45
46 if ($this->utmField->getFetchDataModifiers())
47 {
48 $modifiers[] = [$this, 'proxyFetchDataModification'];
49 }
50
51 return $modifiers;
52 }
53
62 public function proxyFetchDataModification($values, $query, $data, $alias)
63 {
64 if ($values !== null)
65 {
66 foreach ($values as $k => $value)
67 {
68 foreach ($this->utmField->getFetchDataModifiers() as $modifier)
69 {
70 $values[$k] = call_user_func_array($modifier, array($values[$k], $query, $data, $alias));
71 }
72 }
73 }
74
75 return $values;
76 }
77}