Example #1
0
 /**
  * AlertView constructor.
  * Based on Bootstrap.
  * @param string $level
  */
 public function __construct($level = 'info')
 {
     parent::__construct('div');
     $this->level = $level;
     $this->cssClass = ['alert' => ['text-center', 'alert']];
     $this->styles = [];
 }
Example #2
0
 /**
  * ListView constructor.
  * @param int $columns
  * @param string $align
  */
 public function __construct($columns = 1, $align = 'left')
 {
     parent::__construct('div');
     $this->columns = $columns;
     $this->align = $align;
     $this->cssClass = ['list_div' => 'list_div', 'list_item' => 'list_item', 'list_label' => 'list_label', 'list_text' => 'list_text'];
     $this->styles = ['list_div' => ['width' => '100%'], 'list_item' => ['display' => 'inline-block', 'padding' => '5px'], 'list_label' => ['font-weight' => 'bold', 'width' => '50%', 'display' => 'inline-block'], 'list_text' => ['width' => '50%', 'display' => 'inline-block']];
 }
Example #3
0
 /**
  * StepView constructor.
  * @param array $steps: [['title'=>'', 'descr'=>''], ...], field descr is optional
  * @param int $current
  */
 public function __construct(array $steps, $current = 0)
 {
     parent::__construct('div');
     $this->steps = $steps;
     $this->current = $current;
     $this->cssClass = ['step_div' => 'ui ordered steps', 'step' => 'step', 'content' => 'content', 'title' => 'title', 'descr' => 'descr', 'current' => 'active', 'completed' => 'completed'];
     $this->styles = ['step_div' => ['margin' => '15px 0 0 0'], 'step' => ['float' => 'left', 'width' => '278px', 'height' => '80px', 'margin' => '10px 5px 10px 5px', 'padding' => '10px', 'border' => 'solid 1px rgba(34, 36, 38, 0.15)', 'border-radius' => '0.28rem'], 'content' => ['display' => 'block'], 'title' => ['font-weight' => '700', 'font-size' => '1.14em'], 'descr' => ['font-weight' => '400'], 'current' => ['background' => '#F3F4F5'], 'completed' => ['color' => 'rgba(40, 40, 40, 0.3)']];
 }