Example #1
0
 /**
  * @param $clientId
  * @param ActiveQuery|null $query
  * @return ActiveQuery
  */
 public static function findByClientId($clientId, ActiveQuery $query = null)
 {
     $query = $query ?: static::find();
     return $query->andWhere(['id' => ClientScopesModel::findByClientId($clientId)->select(['scope_id'])]);
 }