title: Yii2 order items of many-to-many relation
body: <p>I've 2 tables (sliders, images) related with junction (sliders_images) table, the relation work fine but I nedd to get related data with specific order, the attribute that define the right order is in the junction table, the relation is defined as:</p>
  
  <pre><code>public function getImages(){
      return $this-&gt;hasMany(Images::className(), ['id' =&gt; 'image_id'])
          -&gt;viaTable('sliders_images', ['slider_id' =&gt; 'id'], function($query){
              $query-&gt;orderBy('sliders_images.display_order ASC');
          });
  }
  </code></pre>
  
  <p>when i call <code>$model-&gt;images</code> I receive the correct images but the wrong order, using foreach the images was ordered by id, how i can get the images ordered by other attribute?</p>