Modify control in such a way that it explicitly shows its validation state.
Returns the modified element.
@param Html $control
@return Html
198414
public function showValidation(Html $control)
	{
		// same parent, but no children
		$fieldset = Html::el($control->getName(), $control->attrs);
		/** @var Html $label */
		foreach ($control->getChildren() as $label) {
			$input = $label->getChildren()[0];
			$label->getChildren()[0] = $this->_rawShowValidation($input);
			$fieldset->addHtml($label);
		}

		return $fieldset;
	}
194
public function getControl()
	{
		$control = parent::getControl();
		$control->type = $this->htmlType;
		$control->addClass($this->htmlType);

		list($min, $max) = $this->extractRangeRule($this->getRules());
		if ($min instanceof DateTimeInterface) {
			$control->min = $min->format($this->htmlFormat);
		}
		if ($max instanceof DateTimeInterface) {
			$control->max = $max->format($this->htmlFormat);
		}
		$value = $this->getValue();
		if ($value instanceof DateTimeInterface) {
			$control->value = $value->format($this->htmlFormat);
		}

		return $control;
	}
57353
public CMAEditorInterface addControl(Control control) {
    if (controls == null) {
      controls = new ArrayList<Control>();
    }

    controls.add(control);
    return this;
  }
1000560
public function controlDataForJs()
    {
        $prop = $this->property();

        $data = [
            // Selectize Control
            'title'                    => (string)$prop->label(),
            'translations'             => [
                'statusTemplate'       => $this->translator()->translate('Step [[ current ]] of [[ total ]]'),
            ],
            'copy_items'               => $this->allowClipboardCopy(),
            'allow_update'             => $this->allowUpdate(),
            'allow_create'             => $this->allowCreate(),

            'form_ident'               => $this->formIdent(),
            'selectize_selector'       => '#'.$this->inputId(),
            'selectize_options'        => $this->selectizeOptions(),
            'choice_obj_map'           => $this->choiceObjMap(),
            'selectize_property_ident' => $prop->ident(),
            'selectize_templates'      => $this->selectizeTemplates(),
            'selectize_property'       => json_encode($this->property()),
            'remote_source'            => $this->remoteSource(),

            // Base Property
            'required'                 => $this->required(),
            'l10n'                     => $this->property()->l10n(),
            'multiple'                 => $this->multiple(),
            'multiple_separator'       => $this->property()->multipleSeparator(),
            'multiple_options'         => $this->property()->multipleOptions(),
        ];

        if ($prop instanceof ObjectProperty) {
            if ($prop->objType()) {
                $data['pattern']  = $prop->pattern();
                $data['obj_type'] = $prop->objType();
            }
        }

        return $data;
    }
1065008
public static function controls($controls, $htmlOptions = array())
    {
        if (TbArray::popValue('row', $htmlOptions, false)) {
            self::addCssClass('row', $htmlOptions);
        }
        $before = TbArray::popValue('before', $htmlOptions, '');
        $after = TbArray::popValue('after', $htmlOptions, '');
        if (is_array($controls)) {
            $controls = implode('', $controls);
        }
        $content = $before . $controls . $after;
        return self::tag('div', $htmlOptions, $content);
    }
1113160
public function renderLabel(Nette\Forms\IControl $control)
	{
		/** @noinspection PhpUndefinedMethodInspection */
		$controlLabel = $control->getLabel();
		if ($controlLabel instanceof Html && $controlLabel->getName() == 'label') {
			// the control has already provided us with the element, no need to create our own
			$controlLabel = $this->configElem(Cnf::label, $controlLabel);
			// just configure it to suit our needs

			$labelHtml = $controlLabel;
		} elseif ($controlLabel === NULL) {
			return Html::el();
		} else {
			// the control doesn't give us <label>, se we'll create our own
			$labelHtml = $this->getElem(Cnf::label);
			if ($controlLabel) {
				$labelHtml->setHtml($controlLabel);
			}
		}

		return $labelHtml;
	}
595283
public function validate(Control $control): bool
  {
    return ($this->data===null) ? ($this->callable)($control) : ($this->callable)($control, $this->data);
  }
318286
public function CustomisationHTML()
    {
        $return = HTMLText::create();
        $items = $this->Customisations();
        $html = "";
        
        if ($items && $items->exists()) {
            foreach ($items as $item) {
                $html .= $item->Title . ': ' . $item->Value . ";<br/>";
            }
        }

        $return->setValue($html);

        $this->extend("updateCustomisationHTML", $return);

        return $return;
    }
734738
public function staticControl($label, $html, $options = array()) {
		$options['type'] = 'static';
		$options = $this->addClass($options, 'form-control-static');
		$options = $this->_initInputOptions($options);

		$html = $this->Html->tag('div', $html, array('class' => $options['class']));

		// If size is set (like in an horizontal form) wrap inside div.size
		if ($this->inputOptions['custom']) {
			$html = $this->Html->tag('div', $html, array('class' => $this->inputOptions['custom']['wrap']));
		}

		if (!empty($options['label'])) {
			$label = $this->Html->tag('label', $label, $options['label']);
		}

		$divOptions = $this->_divOptions($options);
		unset($divOptions['tag']);
		$html = $this->Html->tag('div', $label . $html, $divOptions);

		return $html;
	}
267756
protected function getControlDivTag()
    {
        $div = new SwatHtmlTag('div');
        $div->id = $this->id;
        $div->class = $this->getCSSClassString();

        return $div;
    }
120337
public function validate(Control $control): bool
  {
    $options = ['options' => ['min_range' => $control->getAttribute('min'),
                              'max_range' => $control->getAttribute('max')]];

    $value = $control->getSubmittedValue();

    // An empty value is valid.
    if ($value==='' || $value===null || $value===false)
    {
      return true;
    }

    // Objects and arrays are not an integer.
    if (!is_scalar($value))
    {
      return false;
    }

    // Filter valid integer values with valid range.
    $integer = filter_var($value, FILTER_VALIDATE_INT, $options);

    // If the actual value and the filtered value are not equal the value is not an integer.
    if ((string)$integer!==(string)$value)
    {
      return false;
    }

    return true;
  }
158492
public function htmlLabel($control, $options = ['class' => 'form-block__name'])
    {
        $this->labels[] = $control->name;
        $value          = e($this->formatLabel($control->name, $control->label));
        $tip            = isset($control->tip) ? tooltip($control->name, $control->tip) : '';
        return '<label for="' . $control->name . '"' . $this->html->attributes($options) . '>' . $value . $tip . '</label>';
    }
10143
protected function getHtmlBody(): string
  {
    $ret = '';
    $i   = 0;
    foreach ($this->controls as $control)
    {
      if ($control!==$this->footerControl)
      {
        $control->addClass(OverviewTable::$class);
        $control->addClass(($i % 2==0) ? 'even' : 'odd');

        $ret .= $control->getHtml();

        $i++;
      }
    }

    return $ret;
  }
286854
public function html($html = null)
    {
        if ($html === null) {
            return $this->_html;
        }
        $this->_html = $html;

        return $this;
    }
727302
public function setCacheControl($control)
    {
        if (strpos('GET,OPTIONS', $this->request->getServer('REQUEST_METHOD')) !== false) {
            return $this->setHeader('Cache-Control', $control);
        }

        return $this;
    }
902408
public function html($input = null) {
        if (is_null($input)) {
            return $this->getHtml();
        } else {
            return $this->setHtml($input);
        }
    }
1318204
private function parseParameterControl($control, $parameters) {
        if($control instanceof \bootbuilder\Pane\Pane) {
            $control->parseParameters($parameters);
        }elseif($control instanceof \bootbuilder\Controls\Control) {
            if(isset($parameters[$control->getName()])) {
                if($control instanceof \bootbuilder\Controls\Checkbox) {
                    if($control instanceof \bootbuilder\Controls\Radio) {
                        if($control->getValue() == $parameters[$control->getName()]) {
                            $control->setChecked(true);
                        }else{
                            $control->setChecked(false);
                        }
                    }else{
                        $control->setChecked(true);
                    }
                }else{
                    $control->setValue(htmlentities($parameters[$control->getName()]));
                }
            }
        }
        
        return $control;
    }