code: protected function renderFooter()
      {
          if ($this->footer !== null) {
              Html::addCssClass($this->footerOptions, 'modal-footer');
              if ($this->closeButton !== false) {
                  $this->footer .= $this->renderCloseButton();
              }
              return Html::tag('div', "\n" . $this->footer . "\n", $this->footerOptions);
          } else {
              return null;
          }
      }
docs: Renders the HTML markup for the footer of the modal
  @return string the rendering result