protected function renderProgress()
    {
        $out = Html::beginTag('div', $this->options) . "\n";
        if (empty($this->bars)) {
            $this->bars = [
                ['label' => $this->label, 'percent' => $this->percent, 'options' => []]
            ];
        }
        $bars = [];
        foreach ($this->bars as $bar) {
            $label = ArrayHelper::getValue($bar, 'label', '');
            if (!isset($bar['percent'])) {
                throw new InvalidConfigException("The 'percent' option is required.");
            }
            $options = ArrayHelper::getValue($bar, 'options', []);
            $bars[] = $this->renderBar($bar['percent'], $label, $options);
        }
        $out .= implode("\n", $bars) . "\n";
        $out .= Html::endTag('div');

        return $out;
    }
protected function renderProgress()
    {
        $out = Html::beginTag('div', $this->options) . "\n";
        if (empty($this->bars)) {
            $this->bars = [
                ['label' => $this->label, 'percent' => $this->percent, 'options' => []]
            ];
        }
        $bars = [];
        foreach ($this->bars as $bar) {
            $label = ArrayHelper::getValue($bar, 'label', '');
            if (!isset($bar['percent'])) {
                throw new InvalidConfigException("The 'percent' option is required.");
            }
            $options = ArrayHelper::getValue($bar, 'options', []);
            $bars[] = $this->renderBar($bar['percent'], $label, $options);
        }
        $out .= implode("\n", $bars) . "\n";
        $out .= Html::endTag('div');

        return $out;
    }
protected function renderProgress ( ) { $ out = Html :: beginTag ( 'div' , $ this -> options ) . "\n" ; if ( empty ( $ this -> bars ) ) { $ this -> bars = [ [ 'label' => $ this -> label , 'percent' => $ this -> percent , 'options' => [ ] ] ] ; } $ bars = [ ] ; foreach ( $ this -> bars as $ bar ) { $ label = ArrayHelper :: getValue ( $ bar , 'label' , '' ) ; if ( ! isset ( $ bar [ 'percent' ] ) ) { throw new InvalidConfigException ( "The 'percent' option is required." ) ; } $ options = ArrayHelper :: getValue ( $ bar , 'options' , [ ] ) ; $ bars [ ] = $ this -> renderBar ( $ bar [ 'percent' ] , $ label , $ options ) ; } $ out .= implode ( "\n" , $ bars ) . "\n" ; $ out .= Html :: endTag ( 'div' ) ; return $ out ; }
Renders the progress.
@return string the rendering result.
@throws InvalidConfigException if the "percent" option is not set in a stacked progress bar.
Renders the progress .