public function renderPair(Nette\Forms\IControl $control)
	{
		$pairHtml = $this->configElem(Cnf::pair);
		/** @noinspection PhpUndefinedMethodInspection */
		/** @noinspection PhpUndefinedFieldInspection */
		$pairHtml->id = $control->getOption(RendererOptions::id);

		$labelHtml = $this->renderLabel($control);
		if (!empty($labelHtml)) {
			$pairHtml->addHtml($labelHtml);
		}

		$nonLabel = $this->getElem(Cnf::nonLabel);

		//region non-label parts
		$controlHtml = $this->renderControl($control);
		$feedbackHtml = $this->renderFeedback($control);
		$descriptionHtml = $this->renderDescription($control);

		if (!empty($controlHtml)) {
			$nonLabel->addHtml($controlHtml);
		}
		if (!empty($feedbackHtml)) {
			$nonLabel->addHtml($feedbackHtml);
		}
		if (!empty($descriptionHtml)) {
			$nonLabel->addHtml($descriptionHtml);
		}
		//endregion

		if (!empty($nonLabel)) {
			$pairHtml->addHtml($nonLabel);
		}

		return $pairHtml->render(0);
	}
public function renderPair(Nette\Forms\IControl $control)
	{
		$pairHtml = $this->configElem(Cnf::pair);
		/** @noinspection PhpUndefinedMethodInspection */
		/** @noinspection PhpUndefinedFieldInspection */
		$pairHtml->id = $control->getOption(RendererOptions::id);

		$labelHtml = $this->renderLabel($control);
		if (!empty($labelHtml)) {
			$pairHtml->addHtml($labelHtml);
		}

		$nonLabel = $this->getElem(Cnf::nonLabel);

		//region non-label parts
		$controlHtml = $this->renderControl($control);
		$feedbackHtml = $this->renderFeedback($control);
		$descriptionHtml = $this->renderDescription($control);

		if (!empty($controlHtml)) {
			$nonLabel->addHtml($controlHtml);
		}
		if (!empty($feedbackHtml)) {
			$nonLabel->addHtml($feedbackHtml);
		}
		if (!empty($descriptionHtml)) {
			$nonLabel->addHtml($descriptionHtml);
		}
		//endregion

		if (!empty($nonLabel)) {
			$pairHtml->addHtml($nonLabel);
		}

		return $pairHtml->render(0);
	}
public function renderPair ( Nette \ Forms \ IControl $ control ) { $ pairHtml = $ this -> configElem ( Cnf :: pair ) ; /** @noinspection PhpUndefinedMethodInspection */ /** @noinspection PhpUndefinedFieldInspection */ $ pairHtml -> id = $ control -> getOption ( RendererOptions :: id ) ; $ labelHtml = $ this -> renderLabel ( $ control ) ; if ( ! empty ( $ labelHtml ) ) { $ pairHtml -> addHtml ( $ labelHtml ) ; } $ nonLabel = $ this -> getElem ( Cnf :: nonLabel ) ; //region non-label parts $ controlHtml = $ this -> renderControl ( $ control ) ; $ feedbackHtml = $ this -> renderFeedback ( $ control ) ; $ descriptionHtml = $ this -> renderDescription ( $ control ) ; if ( ! empty ( $ controlHtml ) ) { $ nonLabel -> addHtml ( $ controlHtml ) ; } if ( ! empty ( $ feedbackHtml ) ) { $ nonLabel -> addHtml ( $ feedbackHtml ) ; } if ( ! empty ( $ descriptionHtml ) ) { $ nonLabel -> addHtml ( $ descriptionHtml ) ; } //endregion if ( ! empty ( $ nonLabel ) ) { $ pairHtml -> addHtml ( $ nonLabel ) ; } return $ pairHtml -> render ( 0 ) ; }
Renders single visual row.
@param \Nette\Forms\IControl $control
@return string
Renders single visual row .