PHP Класс app\helpers\featuresHelper

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

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

Метод Описание
__construct ( )
callFunctions ( $name )
getFeatures ( [boolean] $array = true ) : array | collection get all features.
group ( $group )
makeSelectColor ( )
oldFeatures ( [array] $productFeatures ) : array organize old data for the product form.
setFeatures ( [collection] $features ) : void set all features.
validateFeatures ( [array] $data ) : [string | array] validate product feature, as specified in the table of product details.

Приватные методы

Метод Описание
validationMessagesFeatures ( [string] $rules, [string] $index, [string] $name ) : [array] create the error message by taking the name feature, and validation rules.

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

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

public __construct ( )

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

public callFunctions ( $name )

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

@param [boolean] $array returns features array or collection
public getFeatures ( [boolean] $array = true ) : array | collection
$array [boolean]
Результат array | collection

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

public group ( $group )

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

public makeSelectColor ( )

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

@param [array] $productFeatures old product features or empty array
public oldFeatures ( [array] $productFeatures ) : array
$productFeatures [array]
Результат array

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

@param [collection] $features all features
public setFeatures ( [collection] $features ) : void
$features [collection]
Результат void

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

validate product feature, as specified in the table of product details.
public validateFeatures ( [array] $data ) : [string | array]
$data [array]
Результат [string | array]