code: public function init()
      {
          parent::init();
          if (empty($this->name)) {
              throw new InvalidConfigException('The "name" property must be set.');
          }
          if (substr_compare($this->name, '[]', -2, 2)) {
              $this->name .= '[]';
          }
  
          $this->registerClientScript();
      }
docs: {@inheritdoc}
  @throws \yii\base\InvalidConfigException if [[name]] is not set.