src/View/Helper/ModalHelper.php
protected function _part($part, $content = null, $options = []) {
        $options += [
            'templateVars' => []
        ];
        $out = $this->_cleanCurrent();
        $out .= $this->formatTemplate($part.'Start', [
            'attrs' => $this->templater()->formatAttributes($options, ['close']),
            'templateVars' => $options
        ]);
        $this->_current = $part;
        if ($content) {
            $out .= $content;
            $out .= $this->_cleanCurrent();
        }
        return $out;
    }
protected function _part($part, $content = null, $options = []) {
        $options += [
            'templateVars' => []
        ];
        $out = $this->_cleanCurrent();
        $out .= $this->formatTemplate($part.'Start', [
            'attrs' => $this->templater()->formatAttributes($options, ['close']),
            'templateVars' => $options
        ]);
        $this->_current = $part;
        if ($content) {
            $out .= $content;
            $out .= $this->_cleanCurrent();
        }
        return $out;
    }
protected function _part ( $ part , $ content = null , $ options = [ ] ) { $ options += [ 'templateVars' => [ ] ] ; $ out = $ this -> _cleanCurrent ( ) ; $ out .= $ this -> formatTemplate ( $ part . 'Start' , [ 'attrs' => $ this -> templater ( ) -> formatAttributes ( $ options , [ 'close' ] ) , 'templateVars' => $ options ] ) ; $ this -> _current = $ part ; if ( $ content ) { $ out .= $ content ; $ out .= $ this -> _cleanCurrent ( ) ; } return $ out ; }
Cleans the current modal part, create a new ones with the given content, and
update the internal `_current` variable if necessary.

@param string $part The name of the part(`'header'`, `'body'`, `'footer'`).
@param string $content The content of the part or `null`.
@param array $options Array of options for the `Html::tag` method.

@return string
Cleans the current modal part create a new ones with the given content and update the internal _current variable if necessary .