original_string: public function renderAlert()
      {
          $user = \Yii::app()->user;
          if (count($user->getFlashes(false)) == 0) {
              return;
          }
          $alerts = array();
          foreach ($this->config as $style => $config) {
              if ($user->hasFlash($style)) {
                  $options = ArrayHelper::getValue($config, 'htmlOptions', array());
                  Html::addCssClass($options, $style);
                  $close    = ArrayHelper::getValue($config, 'close', '&times;');
                  $alerts[] = \foundation\helpers\Alert::alert($user->getFlash($style), $options, $close);
              }
          }
          $this->registerEvents("#{$this->htmlOptions['id']} > .alert-box", $this->events);
  
          return \CHtml::tag('div', $this->htmlOptions, implode("\n", $alerts));
      }
code: public function renderAlert()
      {
          $user = \Yii::app()->user;
          if (count($user->getFlashes(false)) == 0) {
              return;
          }
          $alerts = array();
          foreach ($this->config as $style => $config) {
              if ($user->hasFlash($style)) {
                  $options = ArrayHelper::getValue($config, 'htmlOptions', array());
                  Html::addCssClass($options, $style);
                  $close    = ArrayHelper::getValue($config, 'close', '&times;');
                  $alerts[] = \foundation\helpers\Alert::alert($user->getFlash($style), $options, $close);
              }
          }
          $this->registerEvents("#{$this->htmlOptions['id']} > .alert-box", $this->events);
  
          return \CHtml::tag('div', $this->htmlOptions, implode("\n", $alerts));
      }
code_tokens: public function renderAlert ( ) { $ user = \ Yii :: app ( ) -> user ; if ( count ( $ user -> getFlashes ( false ) ) == 0 ) { return ; } $ alerts = array ( ) ; foreach ( $ this -> config as $ style => $ config ) { if ( $ user -> hasFlash ( $ style ) ) { $ options = ArrayHelper :: getValue ( $ config , 'htmlOptions' , array ( ) ) ; Html :: addCssClass ( $ options , $ style ) ; $ close = ArrayHelper :: getValue ( $ config , 'close' , '&times;' ) ; $ alerts [ ] = \ foundation \ helpers \ Alert :: alert ( $ user -> getFlash ( $ style ) , $ options , $ close ) ; } } $ this -> registerEvents ( "#{$this->htmlOptions['id']} > .alert-box" , $ this -> events ) ; return \ CHtml :: tag ( 'div' , $ this -> htmlOptions , implode ( "\n" , $ alerts ) ) ; }
docstring: Renders the alert
  @return string the rendering result
docstring_tokens: Renders the alert