1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
display.php
См. документацию.
1<?php
2
6
7namespace Bitrix\Main\UserField;
8
9use Bitrix\Main\UserField\Types\BaseType;
10
11class Display implements IDisplay
12{
13 const MODE_EDIT = BaseType::MODE_EDIT;
14 const MODE_VIEW = BaseType::MODE_VIEW;
15
16 protected $userField;
19 "bVarsFromForm" => false,
20 );
21 protected $mode = self::MODE_VIEW;
22 protected $tpl = '';
23
24 public function __construct($mode = self::MODE_VIEW, string $tpl = '')
25 {
26 $this->mode = $mode;
27 $this->tpl = $tpl;
28 $this->additionalParameters = $this->defaultAdditionalParameters;
29 }
30
34 public function getField()
35 {
36 return $this->userField;
37 }
38
42 public function setField(array $userField)
43 {
44 $this->userField = $userField;
45 }
46
47 public function setAdditionalParameter($param, $value, $storeAsDefault = false)
48 {
49 $this->additionalParameters[$param] = $value;
50 if($storeAsDefault)
51 {
52 $this->defaultAdditionalParameters[$param] = $value;
53 }
54 }
55
56 public function clear()
57 {
58 $this->userField = null;
59 $this->additionalParameters = $this->defaultAdditionalParameters;
60 }
61
62 protected function getAdditionalParameters()
63 {
65 }
66
67 public function display()
68 {
70
71 $this->setAdditionalParameter('mode', $this->mode);
72 //$this->setAdditionalParameter('tpl', $this->tpl);
73
74 if($this->mode === self::MODE_EDIT)
75 {
76 return $USER_FIELD_MANAGER->GetPublicEdit(
77 $this->getField(),
79 );
80 }
81 else
82 {
83 return $USER_FIELD_MANAGER->GetPublicView(
84 $this->getField(),
86 );
87 }
88 }
89}
__construct($mode=self::MODE_VIEW, string $tpl='')
Определения display.php:24
setField(array $userField)
Определения display.php:42
$defaultAdditionalParameters
Определения display.php:18
$additionalParameters
Определения display.php:17
setAdditionalParameter($param, $value, $storeAsDefault=false)
Определения display.php:47
const MODE_EDIT
Определения display.php:13
const MODE_VIEW
Определения display.php:14
getAdditionalParameters()
Определения display.php:62
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
global $USER_FIELD_MANAGER
Определения attempt.php:6