app\helpers\productsHelper::getFieldToSuggestions PHP Méthode

getFieldToSuggestions() public méthode

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