macgyer\yii2materializecss\widgets\Modal::renderFooter PHP Method

renderFooter() protected method

Renders the Modal footer.
protected renderFooter ( ) : string
return string the rendered markup of the footer.
    protected function renderFooter()
    {
        if (!$this->footer && $this->closeButtonPosition != self::CLOSE_BUTTON_POSITION_BEFORE_FOOTER && $this->closeButtonPosition != self::CLOSE_BUTTON_POSITION_AFTER_FOOTER) {
            return '';
        }
        $html = [];
        Html::addCssClass($this->footerOptions, ['footer' => 'modal-footer']);
        $html[] = Html::beginTag('div', $this->footerOptions);
        if ($this->closeButtonPosition === self::CLOSE_BUTTON_POSITION_BEFORE_FOOTER) {
            $html[] = $this->renderCloseButton();
        }
        $html[] = $this->footer;
        if ($this->closeButtonPosition === self::CLOSE_BUTTON_POSITION_AFTER_FOOTER) {
            $html[] = $this->renderCloseButton();
        }
        $html[] = Html::endTag('div');
        return implode("\n", $html);
    }