Contao\FormCheckBox::getAttributes PHP Method

getAttributes() public method

Return all attributes as string
public getAttributes ( array $arrStrip = [] ) : string
$arrStrip array An optional array with attributes to strip
return string The attributes string
    public function getAttributes($arrStrip = array())
    {
        // The "required" attribute only makes sense for single checkboxes
        if (count($this->arrOptions) == 1 && $this->mandatory) {
            $this->arrAttributes['required'] = 'required';
        }
        return parent::getAttributes($arrStrip);
    }