PHP Class CartEditField, silvershop-core

Inheritance: extends FormField
Exibir arquivo Open project: burnbright/silverstripe-shop Class Usage Examples

Protected Properties

Property Type Description
$cart
$editableItemsCallback
$items
$template

Public Methods

Method Description
Field ( array $properties = [] ) Render the cart with editable item fields.
__construct ( $name, $title, $cart )
getItemsList ( ) : SS_List Get the items list being used to produce the cart.
setEditableItemsCallback ( Closure $callback ) Provides a way to modify the editableItems list before it is rendered.
setItemsList ( SS_List $list ) Allow overriding the given items list.
setTemplate ( string $template ) Set tempalte for rendering editable cart.

Protected Methods

Method Description
editableItems ( ) Add quantity, variation and remove fields to the item set.

Method Details

Field() public method

Render the cart with editable item fields.
public Field ( array $properties = [] )
$properties array

__construct() public method

public __construct ( $name, $title, $cart )

editableItems() protected method

Add quantity, variation and remove fields to the item set.
protected editableItems ( )

getItemsList() public method

Get the items list being used to produce the cart.
public getItemsList ( ) : SS_List
return SS_List

setEditableItemsCallback() public method

Provides a way to modify the editableItems list before it is rendered.
public setEditableItemsCallback ( Closure $callback )
$callback Closure

setItemsList() public method

This helps with formatting, grouping, ordering etc.
public setItemsList ( SS_List $list )
$list SS_List

setTemplate() public method

Set tempalte for rendering editable cart.
public setTemplate ( string $template )
$template string

Property Details

$cart protected_oe property

protected $cart

$editableItemsCallback protected_oe property

protected $editableItemsCallback

$items protected_oe property

protected $items

$template protected_oe property

protected $template