PHP Class app\helpers\productsHelper

Show file Open project: ant-vel/antVel Class Usage Examples

Public Methods

Method Description
categoriesDropDownFormat ( $array, &$outPut )
countingProductsByCategory ( [type] $all_products, [type] $categories ) : [array] countingProductsByCategory Products total by category collection.
getFieldToSuggestions ( $key ) : [string] get the table product field evaluated by the time when it calls.
resetHaystack ( )
setToHaystack ( $products, $field = 'id' ) : [array] Build the not in id array to be evaluated in suggestions.
suggest ( $type, $limit = 4 ) : [json] manage the home section suggestions.

Method Details

categoriesDropDownFormat() public static method

public static categoriesDropDownFormat ( $array, &$outPut )

countingProductsByCategory() public static method

countingProductsByCategory Products total by category collection.
public static countingProductsByCategory ( [type] $all_products, [type] $categories ) : [array]
$all_products [type]
$categories [type]
return [array]

getFieldToSuggestions() public method

get the table product field evaluated by the time when it calls.
public getFieldToSuggestions ( $key ) : [string]
return [string]

resetHaystack() public method

public resetHaystack ( )

setToHaystack() public method

Build the not in id array to be evaluated in suggestions.
public setToHaystack ( $products, $field = 'id' ) : [array]
return [array]

suggest() public static method

manage the home section suggestions.
public static suggest ( $type, $limit = 4 ) : [json]
return [json]