Exemple #1
0
 public function init()
 {
     parent::init();
     $this->options['class'] = 'tabs';
     $this->options['currentIndex'] = $this->currentIndex;
     $this->options['eventType'] = $this->eventType;
     echo Html::beginTag('div', $this->options);
 }
Exemple #2
0
 public function init()
 {
     parent::init();
     if (!in_array($this->type, $this->CLASS_RANGE)) {
         throw new InvalidParamException("Param type must in range '" . implode(' ', $this->CLASS_RANGE) . "'", 1);
     }
     if ($this->content == null || $this->content == "") {
         throw new InvalidParamException("content can not be null", 1);
     }
 }
Exemple #3
0
 public function init()
 {
     parent::init();
     if ($this->route === null && Yii::$app->controller !== null) {
         $this->route = Yii::$app->controller->getRoute();
     }
     if ($this->params === null) {
         $this->params = Yii::$app->request->getQueryParams();
     }
 }
Exemple #4
0
 public function init()
 {
     parent::init();
     if (!isset($this->title) || $this->title == '') {
         throw new InvalidCallException("Title is not allowed null or ''");
     }
     if (!isset($this->options['class'])) {
         $this->options['class'] = 'panel';
     }
     echo Html::beginTag('div', $this->options) . Html::tag('h1', $this->title) . Html::beginTag('div');
 }