Example #1
0
 /**
  * @param Component $component
  * @return \yii\db\ActiveQuery
  */
 public static function baseQuery($component)
 {
     $query = static::find()->where(['component' => $component->className()]);
     if ($component->namespace) {
         $query->andWhere(['namespace' => $component->namespace]);
     }
     return $query;
 }