/** * Renders the header HTML markup of the modal */ public function renderModalHeader() { echo '<div class="modal-header">' . PHP_EOL; if ($this->closeText) { echo BSHtml::closeButton($this->closeText, array('data-dismiss' => 'modal')); } echo BSHtml::tag('h3', array(), $this->header); echo '</div>' . PHP_EOL; }
/** * Runs the widget. */ public function run() { $brand = $this->brandLabel !== false ? BSHtml::navbarBrandLink($this->brandLabel, $this->brandUrl, $this->brandOptions) : ''; ob_start(); foreach ($this->items as $item) { if (is_string($item)) { echo $item; } else { $widgetClassName = \bootstrap\helpers\BSArray::popValue('class', $item); if ($widgetClassName !== null) { $this->controller->widget($widgetClassName, $item); } } } $items = ob_get_clean(); ob_start(); if ($this->collapse !== false) { BSHtml::addCssClass('collapse navbar-collapse', $this->collapseOptions); ob_start(); /* @var BsCollapse $collapseWidget */ $collapseWidget = $this->controller->widget('bootstrap.widgets.BsCollapse', array('toggle' => false, 'content' => $items, 'htmlOptions' => $this->collapseOptions)); $collapseContent = ob_get_clean(); $collapseLink = BSHtml::navbarCollapseLink('#' . $collapseWidget->getId()); echo BSHtml::tag('div', array('class' => 'navbar-header'), $collapseLink . $brand) . $collapseContent; } else { echo BSHtml::tag('div', array('class' => 'navbar-header'), $brand) . $items; } $containerContent = ob_get_clean(); $containerOptions = \bootstrap\helpers\BSArray::popValue('containerOptions', $this->htmlOptions, array()); BSHtml::addCssClass('container', $containerOptions); $content = BSHtml::tag('div', $containerOptions, $containerContent); echo BSHtml::navbar($content, $this->htmlOptions); }
/** * Renders the empty message when there is no data. */ public function renderEmptyText() { $emptyText = $this->emptyText === null ? Yii::t('zii', 'No results found.') : $this->emptyText; echo BSHtml::tag('div', array('class' => 'empty', 'span' => 12), $emptyText); }