title: YII: How to use "with" and sort at the same time?
body: <p>I've got a problem on YII relation tables.</p>
  
  <p>As the title says, I just want to combine table "A" with table "B" and sort the combined table according to the "clickTimes" in table "B".</p>
  
  <pre><code>        $A = self::find()
          -&gt; with(['B'=&gt;['order'=&gt;'clickTimes DESC']])
          -&gt; all();
  </code></pre>
  
  <p>The above is what I've learned from the Internet but it didn't work. The error goes below.</p>
  
  <pre><code>PHP Warning – yii\base\ErrorException
  call_user_func() expects parameter 1 to be a valid callback, array must have exactly two members
  </code></pre>
  
  <p>The relation works fine except for the sorting. Any suggestion? Thank you so much!</p>