24 $this->content = array();
29 if (isset($label) && $label !==
"")
32 $this->_validation = NULL;
37 $labelO->setPointing($pointing);
38 $this->
addContent($labelO, $pointing ===
"below" || $pointing ===
"right");
44 if (\is_string($label)) {
46 $labelO->setContent($label);
47 $labelO->setProperty(
"for", \str_replace(
"field-",
"", $this->identifier));
49 $this->content[
"label"] = $labelO;
53 $this->content[
"field"] = $field;
62 if (\array_key_exists(
"label", $this->content))
63 return $this->content[
"label"];
72 return $this->content[
"field"];
81 return $this->content[
"field"];
89 unset($this->content[
"label"]);
90 $this->content[
"label"] = $label;
100 if (\is_int($width)) {
104 if (isset($this->_container)) {
105 $this->_container->setEqualWidth(
false);
138 public function addRule($type, $prompt = NULL, $value = NULL) {
141 if (! isset($this->_validation)) {
144 if($type instanceof
Rule){
145 if($type->getType()==
'empty'){
148 }elseif ($type ===
'empty' || ($type[
'type'] ??
'') ===
'empty') {
151 $this->_validation->addRule($type, $prompt, $value);
159 if (! isset($this->_validation)) {
167 foreach ($rules as $rule) {
174 $this->_validation = null;
180 return $field->addIcon($icon, $direction);
192 if (isset($this->_validation)) {
193 $this->_validation->compile($js);
addToProperty($name, $value, $separator=" ")
Semantic Label component.
addContent($content, $before=false)
jsDoJquery($jqueryCall, $param="")
Base class for Semantic double elements.
addToPropertyCtrl($name, $value, $typeCtrl)