title: Yii2 select2 widget return saved results
body: <p>How can I display saved database rows on kartik Select2 widget? I set the multiple option to <code>true</code> and it works fine. I saved 3 records in database table and now I am trying to display them on model update. Tried to put them in the <code>value</code> property of the widget but nothing happens. This is what I declared :</p>
  
  <pre><code> &lt;?=
                          Select2::widget([
                              'name' =&gt; 'categories',
                              'data' =&gt; Attribute::getAllCategoriesSelect2(),
                              'options' =&gt; [
                                  'multiple' =&gt; true,
                                  'placeholder' =&gt; Yii::t('app', 'Select categories'),
                                  'allowClear' =&gt; true
                              ],
                          ])
                      ?&gt;
  </code></pre>
  
  <p>What i've tried is to put my records like this : <code>'value' =&gt; $data</code>, where <code>$data</code> is: </p>
  
  <pre><code>$data = (new \yii\db\Query())
                              -&gt;select(['page.id', 'pageLang.title'])
                              -&gt;from('page')
                              -&gt;leftJoin('pageLang', 'page.id=pageLang.page_id')
                              -&gt;rightJoin('attribute_category', 'page.id=attribute_category.category_id')
                              -&gt;where('pageLang.language=:lang', [':lang' =&gt; Yii::$app-&gt;language])
                              -&gt;andWhere('page.is_cat=1')
                              -&gt;all();
  </code></pre>
  
  <p>I didn't find any explanation about this in the kartik documentation. Can you guys give me an advice? Thank you!</p>