PHP Class CheckoutComponentConfig, silvershop-core

Inheritance: extends Object
显示文件 Open project: burnbright/silverstripe-shop Class Usage Examples

Protected Properties

Property Type Description
$components
$namespaced
$order

Public Methods

Method Description
__construct ( Order $order, $namespaced = true ) namespace fields according to their component
addComponent ( CheckoutComponent $component, string $insertBefore = null )
getComponentByType ( $type ) : GridFieldComponent Returns the first available component with the given class or interface.
getComponents ( ) : ArrayList
getData ( ) : array Get combined data
getFormFields ( ) : FieldList Get combined form fields
getOrder ( )
getRequiredFields ( )
setData ( array $data ) Set data on all components
validateData ( array $data ) : boolean Validate every component against given data.

Protected Methods

Method Description
dependantData ( $component, $data ) Helper function for saving data from other components.

Method Details

__construct() public method

namespace fields according to their component
public __construct ( Order $order, $namespaced = true )
$order Order

addComponent() public method

public addComponent ( CheckoutComponent $component, string $insertBefore = null )
$component CheckoutComponent
$insertBefore string The class of the component to insert this one before

dependantData() protected method

Helper function for saving data from other components.
protected dependantData ( $component, $data )

getComponentByType() public method

Returns the first available component with the given class or interface.
public getComponentByType ( $type ) : GridFieldComponent
return GridFieldComponent

getComponents() public method

public getComponents ( ) : ArrayList
return ArrayList Of GridFieldComponent

getData() public method

Get combined data
public getData ( ) : array
return array map of field names to data values

getFormFields() public method

Get combined form fields
public getFormFields ( ) : FieldList
return FieldList namespaced fields

getOrder() public method

public getOrder ( )

getRequiredFields() public method

public getRequiredFields ( )

setData() public method

Set data on all components
public setData ( array $data )
$data array map of field names to data values

validateData() public method

Validate every component against given data.
public validateData ( array $data ) : boolean
$data array data to validate
return boolean validation result

Property Details

$components protected_oe property

protected $components

$namespaced protected_oe property

protected $namespaced

$order protected_oe property

protected $order