src/Netzmacht/Bootstrap/Buttons/ContentElement/ButtonElement.php
protected function setDataAttributes(Attributes $attributes)
    {
        // add data attributes
        $this->bootstrap_dataAttributes = deserialize($this->bootstrap_dataAttributes, true);

        if (empty($this->bootstrap_dataAttributes)) {
            return;
        }

        foreach ($this->bootstrap_dataAttributes as $attribute) {
            if (trim($attribute['value']) != '' && $attribute['name'] != '') {
                $attributes->setAttribute('data-' . $attribute['name'], $attribute['value']);
            }
        }
    }
protected function setDataAttributes(Attributes $attributes)
    {
        // add data attributes
        $this->bootstrap_dataAttributes = deserialize($this->bootstrap_dataAttributes, true);

        if (empty($this->bootstrap_dataAttributes)) {
            return;
        }

        foreach ($this->bootstrap_dataAttributes as $attribute) {
            if (trim($attribute['value']) != '' && $attribute['name'] != '') {
                $attributes->setAttribute('data-' . $attribute['name'], $attribute['value']);
            }
        }
    }
protected function setDataAttributes ( Attributes $ attributes ) { // add data attributes $ this -> bootstrap_dataAttributes = deserialize ( $ this -> bootstrap_dataAttributes , true ) ; if ( empty ( $ this -> bootstrap_dataAttributes ) ) { return ; } foreach ( $ this -> bootstrap_dataAttributes as $ attribute ) { if ( trim ( $ attribute [ 'value' ] ) != '' && $ attribute [ 'name' ] != '' ) { $ attributes -> setAttribute ( 'data-' . $ attribute [ 'name' ] , $ attribute [ 'value' ] ) ; } } }
Set data attributes.

@param Attributes $attributes Link attributes.

@return void
Set data attributes .