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 strlen($this->sLabel) > 0; } /** * @return string|null * @since 3.0.1 */ public function GetDescription(): ?string { return $this->sDescription; } /** * @param string|null $sDescription * @return $this * @since 3.0.1 */ public function SetDescription(?string $sDescription) { $this->sDescription = $sDescription; return $this; } /** * @return bool * @since 3.0.1 */ public function HasDescription(): bool { return strlen($this->sDescription) > 0; } }