public function prepareCondition(&$query, $modelForm)
    {
        foreach ($modelForm->attributes() as $attribute) {
            if ($attribute === 'table' || is_null($modelForm[$attribute])) {
                continue;
            }
            $filterConfig = Yii::$app->controller->module->filters[$attribute];
            $query->andWhere("{$filterConfig['attribute']} {$filterConfig['criteria']['operator']} :{$attribute}", [
                $attribute => $modelForm[$attribute],
            ]);
        }
    }
public function prepareCondition(&$query, $modelForm)
    {
        foreach ($modelForm->attributes() as $attribute) {
            if ($attribute === 'table' || is_null($modelForm[$attribute])) {
                continue;
            }
            $filterConfig = Yii::$app->controller->module->filters[$attribute];
            $query->andWhere("{$filterConfig['attribute']} {$filterConfig['criteria']['operator']} :{$attribute}", [
                $attribute => $modelForm[$attribute],
            ]);
        }
    }
public function prepareCondition ( & $ query , $ modelForm ) { foreach ( $ modelForm -> attributes ( ) as $ attribute ) { if ( $ attribute === 'table' || is_null ( $ modelForm [ $ attribute ] ) ) { continue ; } $ filterConfig = Yii :: $ app -> controller -> module -> filters [ $ attribute ] ; $ query -> andWhere ( "{$filterConfig['attribute']} {$filterConfig['criteria']['operator']} :{$attribute}" , [ $ attribute => $ modelForm [ $ attribute ] , ] ) ; } }
Prepares where condition

@param Query $query
@param \yii\base\Model $modelForm
@return string
Prepares where condition