public function panel()
{
return _class('html')->panel(['title' => 'Panel title', 'body' => 'Panel content']);
}
public function panel($extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
$extra['class'] = $extra['class'] ?: 'panel panel-default';
return
'<div class="' . implode(' ', array_filter([$extra['class'], $extra['class_add']])) . '" id="' . $extra['id'] . '">
<div class="panel-heading">
<h3 class="panel-title">' . $extra['title'] . '</h3>
</div>
<div class="panel-body">' . $extra['body'] . '</div>
</div>';
}