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

renderToggleButton() protected method

Renders the Modal's toggle button.
See also: toggleButton
protected renderToggleButton ( ) : null | string
return null | string the rendered result.
    protected function renderToggleButton()
    {
        if (($toggleButton = $this->toggleButton) !== false) {
            $tag = ArrayHelper::remove($toggleButton, 'tag', 'button');
            $label = ArrayHelper::remove($toggleButton, 'label', 'Show');
            if ($tag === 'button' && !isset($toggleButton['type'])) {
                $toggleButton['type'] = 'button';
            }
            if ($tag === 'button' && !isset($toggleButton['data-target'])) {
                $toggleButton['data-target'] = $this->options['id'];
            }
            return Html::tag($tag, $label, $toggleButton);
        } else {
            return null;
        }
    }