src/widget/Alert.php
protected function initOptions()
    {
        Html::addCssClass($this->options, 'alert');
        
        if($this->fadeeffect){
            Html::addCssClass($this->options, 'fade');
            Html::addCssClass($this->options, 'in');            
        }
        $this->options = array_merge($this->options,['role'=>'alert']);

        if ($this->closeButton !== null) {
            $this->closeButton = array_merge([
                'data-dismiss' => 'alert',
                'aria-hidden' => 'true',
                'class' => 'close',
            ], $this->closeButton);
        }
    }
protected function initOptions()
    {
        Html::addCssClass($this->options, 'alert');
        
        if($this->fadeeffect){
            Html::addCssClass($this->options, 'fade');
            Html::addCssClass($this->options, 'in');            
        }
        $this->options = array_merge($this->options,['role'=>'alert']);

        if ($this->closeButton !== null) {
            $this->closeButton = array_merge([
                'data-dismiss' => 'alert',
                'aria-hidden' => 'true',
                'class' => 'close',
            ], $this->closeButton);
        }
    }
Initializes the widget options.
This method sets the default values for various options.