public function prepareAttributes($options)
    {
        if (!$options) {
            return null;
        }

        $attributes = [];

        foreach ($options as $name => $option) {
            if ($option !== null) {
                $name = is_numeric($name) ? $option : $name;
                $attributes[] = $name.'="'.$option.'" ';
            }
        }

        return join('', $attributes);
    }
public function prepareAttributes($options)
    {
        if (!$options) {
            return null;
        }

        $attributes = [];

        foreach ($options as $name => $option) {
            if ($option !== null) {
                $name = is_numeric($name) ? $option : $name;
                $attributes[] = $name.'="'.$option.'" ';
            }
        }

        return join('', $attributes);
    }
public function prepareAttributes ( $ options ) { if ( ! $ options ) { return null ; } $ attributes = [ ] ; foreach ( $ options as $ name => $ option ) { if ( $ option !== null ) { $ name = is_numeric ( $ name ) ? $ option : $ name ; $ attributes [ ] = $ name . '="' . $ option . '" ' ; } } return join ( '' , $ attributes ) ; }
Convert array of attributes to html attributes.

@param $options
@return string
Convert array of attributes to html attributes .