src/View/Helper/ModalHelper.php
protected function _createHeader($title = null, $options = []) {
        $options += [
            'close' => true
        ];
        $out = null;
        if($title) {
            $out = '';
            if($options['close']) {
                $out .= $this->formatTemplate('modalHeaderCloseButton', [
                    'content' => $this->formatTemplate('modalHeaderCloseContent', []),
                    'label' => __('Close')
                ]);
            }
            $out .= $this->formatTemplate('modalTitle', [
                'content' => $title,
                'attrs' => $this->templater()->formatAttributes([
                    'id' => $this->_currentId ? $this->_currentId.'Label' : false
                ])
            ]);
        }
        return $this->_part('header', $out, $options);
    }
protected function _createHeader($title = null, $options = []) {
        $options += [
            'close' => true
        ];
        $out = null;
        if($title) {
            $out = '';
            if($options['close']) {
                $out .= $this->formatTemplate('modalHeaderCloseButton', [
                    'content' => $this->formatTemplate('modalHeaderCloseContent', []),
                    'label' => __('Close')
                ]);
            }
            $out .= $this->formatTemplate('modalTitle', [
                'content' => $title,
                'attrs' => $this->templater()->formatAttributes([
                    'id' => $this->_currentId ? $this->_currentId.'Label' : false
                ])
            ]);
        }
        return $this->_part('header', $out, $options);
    }
protected function _createHeader ( $ title = null , $ options = [ ] ) { $ options += [ 'close' => true ] ; $ out = null ; if ( $ title ) { $ out = '' ; if ( $ options [ 'close' ] ) { $ out .= $ this -> formatTemplate ( 'modalHeaderCloseButton' , [ 'content' => $ this -> formatTemplate ( 'modalHeaderCloseContent' , [ ] ) , 'label' => __ ( 'Close' ) ] ) ; } $ out .= $ this -> formatTemplate ( 'modalTitle' , [ 'content' => $ title , 'attrs' => $ this -> templater ( ) -> formatAttributes ( [ 'id' => $ this -> _currentId ? $ this -> _currentId . 'Label' : false ] ) ] ) ; } return $ this -> _part ( 'header' , $ out , $ options ) ; }
Create or open a modal header.

### Options

- `close` Set to `false` to not add a close button to the modal. Default is `true`.
- `templateVars` Provide template variables for the `headerStart` template.
- Other attributes will be assigned to the modal header element.

@param string $text The modal header content, or null to only open the header.
@param array $options Array of options. See above.

@return string A formated opening tag for the modal header or the complete modal
header.

@see `BootstrapModalHelper::header`
Create or open a modal header .