protected function renderProgress()
    {
        if (empty($this->bars)) {
            $config = ['percent' => $this->percent, 'animated' => $this->animated, 'striped' => $this->striped];
            return $this->renderBar($config, $this->label, $this->barOptions);
        }
        $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, $label, $options);
        }

        return implode("\n", $bars);
    }
protected function renderProgress()
    {
        if (empty($this->bars)) {
            $config = ['percent' => $this->percent, 'animated' => $this->animated, 'striped' => $this->striped];
            return $this->renderBar($config, $this->label, $this->barOptions);
        }
        $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, $label, $options);
        }

        return implode("\n", $bars);
    }
protected function renderProgress ( ) { if ( empty ( $ this -> bars ) ) { $ config = [ 'percent' => $ this -> percent , 'animated' => $ this -> animated , 'striped' => $ this -> striped ] ; return $ this -> renderBar ( $ config , $ this -> label , $ this -> barOptions ) ; } $ 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 , $ label , $ options ) ; } return implode ( "\n" , $ bars ) ; }
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 .