51 empty($params[
'type']) ? Type::TEXT : $params[
'type']
53 ->
setName($params[
'name'] ??
null)
54 ->setSort($params[
'sort'] ??
null)
55 ->setAlign($params[
'align'] ??
null)
56 ->setTitle($params[
'title'] ??
null)
57 ->setWidth($params[
'width'] ??
null)
58 ->setSection($params[
'section_id'] ??
null)
59 ->setCssClassName($params[
'class'] ??
null)
62 $this->
setSelect($params[
'select'] ?? [ $id ]);
64 if (isset($params[
'editable']))
69 if (isset($params[
'first_order']))
71 $this->setFirstOrder($params[
'first_order']);
74 if (isset($params[
'default']))
79 if (isset($params[
'necessary']))
84 if (isset($params[
'multiple']))
89 if (isset($params[
'resizeable']))
91 $this->setResizeable($params[
'resizeable']);
94 if (isset($params[
'prevent_default']))
96 $this->setPreventDefault($params[
'prevent_default']);
99 if (isset($params[
'sticked']))
101 $this->setSticked($params[
'sticked']);
104 if (isset($params[
'shift']))
106 $this->setShift($params[
'shift']);
109 if (isset($params[
'showname']))
111 $this->setShowname($params[
'showname']);
114 $color = $params[
'color'] ??
null;
115 if (isset($color) && is_string($color))
117 if (self::isValidCssColorValue($color))
119 $this->setCssColorValue($color);
123 $this->setCssColorClassName($color);
127 if (isset($params[
'iconUrl']))
132 $params[
'iconTitle'] ??
null
137 if (isset($params[
'hint']))
139 $hint =
new Hint($params[
'hint']);
141 if (isset($params[
'hintHtml']) && is_bool($params[
'hintHtml']))
143 $hint->
setHtml($params[
'hintHtml']);
146 if (isset($params[
'hintInteractivity']) && is_bool($params[
'hintInteractivity']))
151 $this->setHint($hint);