PHP Class app\helpers\featuresHelper

Afficher le fichier Open project: ant-vel/antVel Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
validationMessagesFeatures ( [string] $rules, [string] $index, [string] $name ) : [array] create the error message by taking the name feature, and validation rules.

Method Details

__construct() public méthode

public __construct ( )

callFunctions() public méthode

public callFunctions ( $name )

getFeatures() public méthode

@param [boolean] $array returns features array or collection
public getFeatures ( [boolean] $array = true ) : array | collection
$array [boolean]
Résultat array | collection

group() public méthode

public group ( $group )

makeSelectColor() public méthode

public makeSelectColor ( )

oldFeatures() public méthode

@param [array] $productFeatures old product features or empty array
public oldFeatures ( [array] $productFeatures ) : array
$productFeatures [array]
Résultat array

setFeatures() public méthode

@param [collection] $features all features
public setFeatures ( [collection] $features ) : void
$features [collection]
Résultat void

validateFeatures() public méthode

validate product feature, as specified in the table of product details.
public validateFeatures ( [array] $data ) : [string | array]
$data [array]
Résultat [string | array]