示例#1
0
文件: Tabs.php 项目: itzj86/yii2-dwz
 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);
 }
示例#2
0
文件: Alert.php 项目: itzj86/yii2-dwz
 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);
     }
 }
示例#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();
     }
 }
示例#4
0
文件: Panel.php 项目: itzj86/yii2-dwz
 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');
 }