bIsLabelBefore; } /** * @param bool $bIsLabelBefore {@see tInputLabel::$bIsLabelBefore} * * @return $this */ public function SetIsLabelBefore(bool $bIsLabelBefore) { $this->bIsLabelBefore = $bIsLabelBefore; if ($this->bIsLabelBefore) { $this->AddCSSClass('ibo-input--label-left'); $this->RemoveCSSClass('ibo-input--label-right'); } else { $this->AddCSSClass('ibo-input--label-right'); $this->RemoveCSSClass('ibo-input--label-left'); } return $this; } /** * @return string|null */ public function GetLabel(): ?string { return $this->sLabel; } /** * @param string|null $sLabel {@see tInputLabel::$sLabel} * * @return $this */ public function SetLabel(?string $sLabel) { $this->sLabel = $sLabel; if (!is_null($sLabel)) { if ($this->bIsLabelBefore) { $this->AddCSSClass('ibo-input--label-left'); $this->RemoveCSSClass('ibo-input--label-right'); } else { $this->AddCSSClass('ibo-input--label-right'); $this->RemoveCSSClass('ibo-input--label-left'); } } else { $this->RemoveCSSClass('ibo-input--label-right'); $this->RemoveCSSClass('ibo-input--label-left'); } return $this; } /** * @return bool */ public function HasLabel(): bool { return $this->sLabel != null; } }