Bootstrap\View\Helper\BootstrapPanelHelper::_createHeader PHP Метод

_createHeader() защищенный Метод

protected _createHeader ( $title, $options = [], $titleOptions = [] )
    protected function _createHeader($title, $options = [], $titleOptions = [])
    {
        if (empty($titleOptions)) {
            $titleOptions = $options['title'];
        }
        unset($options['title']);
        $title = $this->_makeIcon($title, $converted);
        $options += ['escape' => !$converted];
        $options = $this->addClass($options, 'panel-heading');
        if ($this->_collapsible) {
            $options += ['role' => 'tab', 'id' => $this->_headId, 'open' => $this->_isOpen()];
            $this->_headId = $options['id'];
            $title = $this->Html->link($title, '#' . $this->_bodyId, ['data-toggle' => 'collapse', 'data-parent' => $this->_groupId ? '#' . $this->_groupId : false, 'aria-expanded' => json_encode($options['open']), 'aria-controls' => '#' . $this->_bodyId, 'escape' => $options['escape']]);
            $options['escape'] = false;
            // Should not escape after
        }
        if ($titleOptions !== false) {
            if (!is_array($titleOptions)) {
                $titleOptions = [];
            }
            $titleOptions += ['tag' => 'h4', 'escape' => $options['escape']];
            $titleOptions = $this->addClass($titleOptions, 'panel-title');
            $tag = $titleOptions['tag'];
            unset($titleOptions['tag']);
            $title = $this->Html->tag($tag, $title, $titleOptions);
        }
        unset($options['escape'], $options['open']);
        return $this->_cleanCurrent() . $this->Html->tag('div', $title, $options);
    }