Esempio n. 1
0
 /**
  * @param $grantType
  * @param ActiveQuery|null $query
  * @return ActiveQuery
  */
 public static function findByGrantType($grantType, ActiveQuery $query = null)
 {
     $query = $query ?: static::find();
     return $query->andWhere(['id' => ClientGrantsModel::findByGrantType($grantType)->select(['client_id'])]);
 }