protected function renderCaption($captionConfig)
    {
        if ($captionConfig === false) {
            return '';
        }

        $content = ArrayHelper::getValue($captionConfig, 'content', '');
        $alignment = ArrayHelper::getValue($captionConfig, 'align', null);
        $options = ArrayHelper::getValue($captionConfig, 'options', []);
        $options = ArrayHelper::merge($this->captionOptions, $options);

        Html::addCssClass($options, ['caption' => 'caption']);
        if ($alignment) {
            Html::addCssClass($options, ['align' => $alignment]);
        }

        return Html::tag('div', $content, $options);
    }
protected function renderCaption($captionConfig)
    {
        if ($captionConfig === false) {
            return '';
        }

        $content = ArrayHelper::getValue($captionConfig, 'content', '');
        $alignment = ArrayHelper::getValue($captionConfig, 'align', null);
        $options = ArrayHelper::getValue($captionConfig, 'options', []);
        $options = ArrayHelper::merge($this->captionOptions, $options);

        Html::addCssClass($options, ['caption' => 'caption']);
        if ($alignment) {
            Html::addCssClass($options, ['align' => $alignment]);
        }

        return Html::tag('div', $content, $options);
    }
protected function renderCaption ( $ captionConfig ) { if ( $ captionConfig === false ) { return '' ; } $ content = ArrayHelper :: getValue ( $ captionConfig , 'content' , '' ) ; $ alignment = ArrayHelper :: getValue ( $ captionConfig , 'align' , null ) ; $ options = ArrayHelper :: getValue ( $ captionConfig , 'options' , [ ] ) ; $ options = ArrayHelper :: merge ( $ this -> captionOptions , $ options ) ; Html :: addCssClass ( $ options , [ 'caption' => 'caption' ] ) ; if ( $ alignment ) { Html :: addCssClass ( $ options , [ 'align' => $ alignment ] ) ; } return Html :: tag ( 'div' , $ content , $ options ) ; }
Renders the caption markup.
@param false|array $captionConfig the caption configuration data
@return string the markup of the caption
Renders the caption markup .