kartik\helpers\Html::panel PHP Method

panel() public static method

Example: ~~~ echo Html::panel([ 'heading' => 'Panel Title', 'body' => 'Panel Content', 'footer' => 'Panel Footer', ], Html::TYPE_PRIMARY); ~~~
See also: http://getbootstrap.com/components/#panels
public static panel ( array $content = [], string $type = 'default', array $options = [], string $prefix = 'panel panel-' ) : string
$content array the panel content configuration. The following properties can be setup: - `preHeading`: _string_, raw content that will be placed before `heading` (optional). - `heading`: _string_, the panel box heading (optional). - `preBody`: _string_, raw content that will be placed before $body (optional). - `body`: _string_, the panel body content - this will be wrapped in a "panel-body" container (optional). - `postBody`: _string_, raw content that will be placed after $body (optional). - `footer`: _string_, the panel box footer (optional). - `postFooter`: _string_, raw content that will be placed after $footer (optional). - `headingTitle`: _boolean_, whether to pre-style heading content with a '.panel-title' class. Defaults to `false`. - `footerTitle`: _boolean_, whether to pre-style footer content with a '.panel-title' class. Defaults to `false`.
$type string the panel type which can be one of the bootstrap color modifier constants. Defaults to [[TYPE_DEFAULT]]. - [[TYPE_DEFAULT]] or `default` - [[TYPE_PRIMARY]] or `primary` - [[TYPE_SUCCESS]] or `success` - [[TYPE_INFO]] or `info` - [[TYPE_WARNING]] or `warning` - [[TYPE_DANGER]] or `danger`
$options array HTML attributes / options for the panel container
$prefix string the CSS prefix for panel type. Defaults to `panel panel-`.
return string
    public static function panel($content = [], $type = 'default', $options = [], $prefix = 'panel panel-')
    {
        if (!is_array($content)) {
            return '';
        } else {
            static::addCssClass($options, $prefix . $type);
            $panel = static::getPanelContent($content, 'preHeading') . static::getPanelTitle($content, 'heading') . static::getPanelContent($content, 'preBody') . static::getPanelContent($content, 'body') . static::getPanelContent($content, 'postBody') . static::getPanelTitle($content, 'footer') . static::getPanelContent($content, 'postFooter');
            return static::tag('div', $panel, $options);
        }
    }

Usage Example

Beispiel #1
0
			<div class="row">
				<!-- KIRI !-->
				<div class="col-lg-4 col-md-4" style="padding-top:10px">
					<div id="chart-piramid"></div>
				</div>
				<!-- KANAN !-->
				<div class="col-lg-8 col-md-8" style="padding-top:10px">
					<?php 
echo Html::panel(['body' => '<div id="chart-cust-parent" style="height:200px"></div> <div id="chart-cust-active-call"  style="height:200px"></div>'], Html::TYPE_INFO);
?>
				</div>
			</div>
		</div>
		<div class="col-xs-12 col-sm-12 col-dm-12  col-lg-12 full-right">			
			<?php 
echo Html::panel(['heading' => 'SALES COMPARE', 'body' => '<div id="chart-cust-active-call"></div>'], Html::TYPE_INFO);
?>
		</div>
	</div>
</div>

<?php 
$this->registerJs('
		/* 
		 * GRAPH PIRAMIT ALL CUSTOMER
		 * @author piter [[email protected]]
		 * @since 1.1
		*/
		$(document).ready(function () {
			var myPiramidChart = new FusionCharts({
				type: "pyramid",
All Usage Examples Of kartik\helpers\Html::panel