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

renderCloseButton() protected method

Renders the close button.
See also: closeButton
protected renderCloseButton ( ) : null | string
return null | string the rendered result.
    protected function renderCloseButton()
    {
        if (($closeButton = $this->closeButton) !== false) {
            $tag = ArrayHelper::remove($closeButton, 'tag', 'button');
            $label = ArrayHelper::remove($closeButton, 'label', '×');
            Html::addCssClass($closeButton, ['close' => 'modal-close']);
            if ($tag === 'button' && !isset($closeButton['type'])) {
                $closeButton['type'] = 'button';
            }
            return Html::tag($tag, $label, $closeButton);
        } else {
            return null;
        }
    }