dokuwiki\Form\DropdownElement::attr PHP Метод

attr() публичный Метод

When no $value is given, the current content of the attribute is returned. An empty string is returned for unset attributes. When a $value is given, the content is set to that value and the Element itself is returned for easy chaining
public attr ( string $name, null | string $value = null ) : string | $this
$name string Name of the attribute to access
$value null | string New value to set
Результат string | $this
    public function attr($name, $value = null)
    {
        if (strtolower($name) == 'multiple') {
            throw new \InvalidArgumentException('Sorry, the dropdown element does not support the "multiple" attribute');
        }
        return parent::attr($name, $value);
    }