Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
colorpicker.php
1<?php
2
4
6
13{
14 const JS_EVENT_ON_SELECT = 'onSelect';
15 private $mode;
16 private $pickerFieldHidden = false;
17
24 public function __construct($key, $mode = 'simple')
25 {
26 parent::__construct($key);
27 $this->setLabel(Loc::getMessage('REPORT_DEFAULT_COLOR_FIELD_LABEL'));
28 $this->setDefaultValue('inherit');
29 $this->setMode($mode);
30 }
31
32
39 public function printContent()
40 {
41 $templateName = $this->getMode() == 'simple' ? 'simplecolorpicker' : 'colorpicker';
42 $this->includeFieldComponent($templateName);
43 }
44
48 public function getMode()
49 {
50 return $this->mode;
51 }
52
59 public function setMode($mode)
60 {
61 $this->mode = $mode;
62 }
63
70 public function isPickerFieldHidden()
71 {
72 return $this->pickerFieldHidden;
73 }
74
81 public function setPickerFieldHidden($pickerFieldHidden)
82 {
83 $this->pickerFieldHidden = $pickerFieldHidden;
84 }
85
86
87}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
includeFieldComponent($templateName, $params=array())
Definition base.php:530