Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
listfieldassembler.php
1<?php
2
4
6
10abstract class ListFieldAssembler extends FieldAssembler
11{
12 private array $names;
13
20 abstract protected function getNames(): array;
21
27 protected function getEmptyName(): ?string
28 {
29 return null;
30 }
31
35 final protected function prepareColumn($value)
36 {
37 if (empty($value))
38 {
39 return $this->getEmptyName();
40 }
41
42 $this->names ??= $this->getNames();
43
44 return $this->names[$value] ?? null;
45 }
46}