title: How to use active query method of another model class via relation in Yii2
body: <p>I have models like below</p>
  
  <pre><code>/**
   * @property integer $id
   * @property string $title
   */
  class Book extends ActiveRecord {
      public static function find() {
          return new BookQuery(self::class);
      }
  }
  
  class BookQuery extends ActiveQuery {
      public function andWhereTitleLike($string) {
          return $this-&gt;andWhere(['like', 'title', $string]);
      }
  }
  
  /**
   * @property integer $id
   * @property integer $userId
   * @property integer $bookId
   * @property integer $addedTime
   */
  class FavoriteBook extends ActiveRecord {
       public function getBook() {
          return $this-&gt;hasOne(Book::class, ['id' =&gt; 'bookId']);
       }
  }
  </code></pre>
  
  <p>Querying favorite books of the current logged user is like below</p>
  
  <pre><code>$dataProvider = new ActiveDataProvider([
      'query' =&gt; FavoriteBook::find()
                     -&gt;andWhere(['userId' =&gt; Yii::$app-&gt;user-&gt;id])
  ]);
  </code></pre>
  
  <p>But how do I query favorite book of the user that contains a certain title by reusing the method in the <code>BookQuery</code> above?</p>