protected static function checkAndFilter($model, $filter)
    {
        foreach ($filter as $child) {
            // AND => first false means false.
            if (!self::checkCondition($model, $child)) {
                return false;
            }
        }
        return true;
    }