PHP Class app\helpers\featuresHelper

ファイルを表示 Open project: ant-vel/antVel Class Usage Examples

Public Methods

Method 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

Method 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 method

public __construct ( )

callFunctions() public method

public callFunctions ( $name )

getFeatures() public method

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

group() public method

public group ( $group )

makeSelectColor() public method

public makeSelectColor ( )

oldFeatures() public method

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

setFeatures() public method

@param [collection] $features all features
public setFeatures ( [collection] $features ) : void
$features [collection]
return void

validateFeatures() public method

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