src/View/Helper/PanelHelper.php
public function end($content = null, $options = []) {
        $this->_lastPanelClosed = true;
        $res = '';
        $res .= $this->_cleanCurrent();
        if ($content !== null) {
            $res .= $this->footer($content, $options);
        }
        $res .= $this->formatTemplate('panelEnd', []);
        $this->_states->pop();
        return $res;
    }
public function end($content = null, $options = []) {
        $this->_lastPanelClosed = true;
        $res = '';
        $res .= $this->_cleanCurrent();
        if ($content !== null) {
            $res .= $this->footer($content, $options);
        }
        $res .= $this->formatTemplate('panelEnd', []);
        $this->_states->pop();
        return $res;
    }
public function end ( $ content = null , $ options = [ ] ) { $ this -> _lastPanelClosed = true ; $ res = '' ; $ res .= $ this -> _cleanCurrent ( ) ; if ( $ content !== null ) { $ res .= $ this -> footer ( $ content , $ options ) ; } $ res .= $ this -> formatTemplate ( 'panelEnd' , [ ] ) ; $ this -> _states -> pop ( ) ; return $ res ; }
Closes a panel, cleans part that have not been closed correctly and optionaly adds a
footer to the panel.

If `$content` is not null, the `footer()` methods will be used to create the panel
footer using `$content` and `$options`.

```php
echo $this->Panel->end('Footer Content', ['my-class' => 'my-footer-class']);
```

@param string|null $content   Footer content, or `null`.
@param array       $options Array of options for the footer.

@return string An HTML string containing closing tags.
Closes a panel cleans part that have not been closed correctly and optionaly adds a footer to the panel .