code: public function init()
      {
          parent::init();
          if (is_array($this->theme)) {
              if (!isset($this->theme['class'])) {
                  $this->theme['class'] = 'yii\base\Theme';
              }
              $this->theme = Yii::createObject($this->theme);
          } elseif (is_string($this->theme)) {
              $this->theme = Yii::createObject($this->theme);
          }
      }
docs: Initializes the view component.