kartik\builder\BaseForm::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        static::prepareAttributes($this->attributes);
        $this->checkBaseConfig();
    }

Usage Example

Example #1
0
 /**
  * Initializes the widget
  *
  * @throws \yii\base\InvalidConfigException
  */
 public function init()
 {
     parent::init();
     $this->checkFormConfig();
     if (empty($this->columnSize)) {
         $this->columnSize = empty($this->form->formConfig['deviceSize']) ? self::SIZE_SMALL : $this->form->formConfig['deviceSize'];
     }
     if (isset($this->form->type)) {
         $this->_orientation = $this->form->type;
     }
     $this->initOptions();
     $this->registerAssets();
     if ($this->autoGenerateColumns) {
         $cols = count($this->attributes);
         $this->columns = $cols >= self::GRID_WIDTH ? self::GRID_WIDTH : $cols;
     }
     echo Html::beginTag($this->_tag, $this->options) . "\n";
 }
All Usage Examples Of kartik\builder\BaseForm::init