You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
1.1 KiB

<?php
namespace backend\widgets\dashboard\templates;
use yii\bootstrap\Widget;
class AdminLteBox3 extends Widget
{
public $title;
public $cssclass;
public $color;
public $body;
public function init()
{
parent::init();
if ($this->cssclass === null) {
$this->cssclass = 'col-md-6 col-sm-12 col-xs-12';
}
if ($this->color === null) {
$this->color = 'box-info';
}
$this->color = $this->color === null ? 'box-info' : 'box-' . $this->color;
if ($this->title === null) {
$this->title = 'Box Title';
}
}
public function run()
{
$header = '<div class="box-header with-border">
<h3 class="box-title">' . $this->title . '</h3>
<div class="box-tools pull-right">
<i class="fa fa-arrows moveHandle moveButton"></i>
</div>
</div>';
$body = $this->body;
return '<div class="box ' . $this->color . ' ' . $this->cssclass . '">' .
$header .
$body .
'</div>';
}
}