sLabel = $sLabel; $this->oInput = $oInput; $this->bBeforeInput = true; } /** * @return UIBlock */ public function GetInput() { return $this->oInput; } /** * @param \Combodo\iTop\Application\UI\Base\UIBlock $oInput * * @return $this */ public function SetInput(UIBlock $oInput) { $this->oInput = $oInput; return $this; } /** * @param bool $bBeforeInput * * @return $this */ public function SetBeforeInput(bool $bBeforeInput) { $this->bBeforeInput = $bBeforeInput; if ($bBeforeInput) { $this->oInput->AddCSSClass('ibo-input--label-left'); } else { $this->oInput->AddCSSClass('ibo-input--label-right'); } return $this; } /** * @return bool */ public function IsLabelBefore(): bool { return $this->bBeforeInput; } /** * @return string */ public function GetLabel(): string { return $this->sLabel; } /** * @param string $sLabel * * @return InputWithLabel */ public function SetLabel(string $sLabel) { $this->sLabel = $sLabel; return $this; } /** * @return mixed */ public function GetDescription() { return $this->sDescription; } /** * @param mixed $sDescription */ public function SetDescription($sDescription) { $this->sDescription = $sDescription; return $this; } /** * @return bool */ public function HasDescription(): bool { return $this->sDescription != null; } }