protected function parseHrefAttributes(?array $attributes) : ?string
    {
        if (empty($attributes)) {
            return null;
        }

        if (isset($attributes['target']) && $attributes['target'] === '_blank') {
            if (!isset($attributes['rel'])) {
                $attributes['rel'] = 'noreferrer noopener';
            }
        }

        $extra = [];

        foreach ($attributes as $attr => $value) {
            $extra[] = $attr . '="' . $value . '"';
        }

        return ' ' . implode(' ', $extra);
    }
protected function parseHrefAttributes(?array $attributes) : ?string
    {
        if (empty($attributes)) {
            return null;
        }

        if (isset($attributes['target']) && $attributes['target'] === '_blank') {
            if (!isset($attributes['rel'])) {
                $attributes['rel'] = 'noreferrer noopener';
            }
        }

        $extra = [];

        foreach ($attributes as $attr => $value) {
            $extra[] = $attr . '="' . $value . '"';
        }

        return ' ' . implode(' ', $extra);
    }
protected function parseHrefAttributes ( ? array $ attributes ) : ? string { if ( empty ( $ attributes ) ) { return null ; } if ( isset ( $ attributes [ 'target' ] ) && $ attributes [ 'target' ] === '_blank' ) { if ( ! isset ( $ attributes [ 'rel' ] ) ) { $ attributes [ 'rel' ] = 'noreferrer noopener' ; } } $ extra = [ ] ; foreach ( $ attributes as $ attr => $ value ) { $ extra [ ] = $ attr . '="' . $ value . '"' ; } return ' ' . implode ( ' ' , $ extra ) ; }
Create attributes string for href

@param array|null $attributes
@return null|string
Create attributes string for href