App\Source\Composite\MenuLink::attributes PHP Method

attributes() public method

Add attributes to the hyperlink
public attributes ( $arAttr = null, $value = null ) : Link
return Link
    public function attributes($arAttr = null, $value = null)
    {
        if (is_array($arAttr)) {
            $this->attributes = array_merge($this->attributes, $arAttr);
            return $this;
        } elseif (isset($value)) {
            $this->attributes[$arAttr] = $value;
            return $this;
        } elseif ($arAttr) {
            return isset($this->attributes[$arAttr]) ? $this->attributes[$arAttr] : null;
        }
        return $this->attributes;
    }