PHP Class CheckoutComponent, silvershop-core

A modularised piece of checkout functionality. A checkout component will: - provide form fields - validate entered data - save data from given form fields
Inheritance: extends Object
Exibir arquivo Open project: burnbright/silverstripe-shop Class Usage Examples

Protected Properties

Property Type Description
$dependson
$requiredfields

Public Methods

Method Description
dependsOn ( )
getData ( Order $order ) : array Get required data out of the model.
getFormFields ( Order $order ) : FieldList Get form fields for manipulating the current order, according to the responsibilty of this component.
getRequiredFields ( Order $order ) : array Get the data fields that are required for the component.
name ( )
setData ( Order $order, array $data ) : Order Set the model data for this component.
validateData ( Order $order, array $data ) : boolean Is this data valid for saving into an order?

Method Details

dependsOn() public method

public dependsOn ( )

getData() abstract public method

Get required data out of the model.
abstract public getData ( Order $order ) : array
$order Order order to get data from.
return array get data from model(s)

getFormFields() abstract public method

Get form fields for manipulating the current order, according to the responsibilty of this component.
abstract public getFormFields ( Order $order ) : FieldList
$order Order
return FieldList fields for manipulating order

getRequiredFields() public method

Get the data fields that are required for the component.
public getRequiredFields ( Order $order ) : array
$order Order [description]
return array required data fields

name() public method

public name ( )

setData() abstract public method

This function should never rely on form.
abstract public setData ( Order $order, array $data ) : Order
$order Order
$data array data to be saved into order object
return Order the updated order

validateData() abstract public method

This function should never rely on form.
abstract public validateData ( Order $order, array $data ) : boolean
$order Order
$data array data to be validated
return boolean the data is valid

Property Details

$dependson protected_oe property

protected $dependson

$requiredfields protected_oe property

protected $requiredfields