PHP Класс app\helpers\productsHelper

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

categoriesDropDownFormat() публичный статический Метод

public static categoriesDropDownFormat ( $array, &$outPut )

countingProductsByCategory() публичный статический Метод

countingProductsByCategory Products total by category collection.
public static countingProductsByCategory ( [type] $all_products, [type] $categories ) : [array]
$all_products [type]
$categories [type]
Результат [array]

getFieldToSuggestions() публичный Метод

get the table product field evaluated by the time when it calls.
public getFieldToSuggestions ( $key ) : [string]
Результат [string]

resetHaystack() публичный Метод

public resetHaystack ( )

setToHaystack() публичный Метод

Build the not in id array to be evaluated in suggestions.
public setToHaystack ( $products, $field = 'id' ) : [array]
Результат [array]

suggest() публичный статический Метод

manage the home section suggestions.
public static suggest ( $type, $limit = 4 ) : [json]
Результат [json]