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;
	}
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;
	}
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 ; }
Renders 'label' part of visual row of controls.
@param \Nette\Forms\IControl $control
@return Html
Renders label part of visual row of controls .