app\helpers\productsHelper::getFieldToSuggestions PHP Method

getFieldToSuggestions() public method

get the table product field evaluated by the time when it calls.
public getFieldToSuggestions ( $key ) : [string]
return [string]
    public function getFieldToSuggestions($key)
    {
        switch ($key) {
            case 'product_purchased':
                return 'sale_counts';
                break;
            default:
                return 'view_counts';
                break;
        }
    }