부터: 1.0
저자: Kartik Visweswaran (kartikv2@gmail.com)
상속: extends yii\bootstrap\Widget, use trait FormTrait
예제 #1
0
 /**
  * Initializes the widget
  *
  * @throws \yii\base\InvalidConfigException
  */
 public function init()
 {
     parent::init();
     if (empty($this->dataProvider) || !$this->dataProvider instanceof \yii\data\BaseDataProvider) {
         throw new InvalidConfigException(
             "The 'dataProvider' property must be set and must be an instance of '\\yii\\data\\BaseDataProvider'."
         );
     }
     $this->initOptions();
     $this->registerAssets();
 }
예제 #2
0
 /**
  * @inheritdoc
  * @throws InvalidConfigException
  */
 public function init()
 {
     parent::init();
     $dp = static::slash(BaseDataProvider::className());
     if (empty($this->dataProvider) || !$this->dataProvider instanceof BaseDataProvider) {
         throw new InvalidConfigException("The 'dataProvider' property must be set and must be an instance of '{$dp}'.");
     }
     $kvGrid = static::slash(GridView::classname());
     if (empty($this->gridClass)) {
         $this->gridClass = $kvGrid;
     } elseif ($this->gridClass !== $kvGrid && !is_subclass_of($this->gridClass, $kvGrid)) {
         throw new InvalidConfigException("The 'gridClass' must be a class which extends from '{$kvGrid}'.");
     }
     $this->initOptions();
     $this->registerAssets();
 }
예제 #3
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     echo $this->contentBefore;
     echo $this->renderFieldSet();
     echo $this->contentAfter;
     echo Html::endTag($this->_tag);
     parent::run();
 }
예제 #4
0
파일: Form.php 프로젝트: oyoy8629/yii-core
 /**
  * @inheritdoc
  */
 public function run()
 {
     echo $this->renderFieldSet();
     echo Html::endTag($this->_tag);
     parent::run();
 }