yii\db\ActiveQuery::andOnCondition PHP Method

andOnCondition() public method

The new condition and the existing one will be joined using the 'AND' operator.
See also: onCondition()
See also: orOnCondition()
public andOnCondition ( string | array $condition, array $params = [] )
$condition string | array the new ON condition. Please refer to [[where()]] on how to specify this parameter.
$params array the parameters (name => value) to be bound to the query.
    public function andOnCondition($condition, $params = [])
    {
        if ($this->on === null) {
            $this->on = $condition;
        } else {
            $this->on = ['and', $this->on, $condition];
        }
        $this->addParams($params);
        return $this;
    }