sLabel = $sLabel; return $this; } public function GetLabel(): ?string { return $this->sLabel; } /** * Set several attributes at once, by ARIA attribute name ("label", "description", ...) * * @param array $aAttributes * @since 3.3.0 */ public function SetMultiple(array $aAttributes): self { foreach ($aAttributes as $sName => $sValue) { $sMethod = 'Set'.$sName; if ($sMethod !== 'SetMultiple' && method_exists($this, $sMethod)) { $this->$sMethod($sValue); } } return $this; } public function GetAttributes(): array { $aAttributes = []; if ($this->sLabel !== null) { $aAttributes['label'] = $this->sLabel; } return $aAttributes; } public function GetHtmlAttributes(): array { $aAttributes = []; if ($this->sLabel !== null) { $aAttributes['aria-label'] = $this->sLabel; } return $aAttributes; } }