swipestripe
[ class tree: swipestripe ] [ index: swipestripe ] [ all elements ]

Class: ModifierSetField

Source Location: /code/form/ModifierSetField.php

Class Overview

DropdownField
   |
   --ModifierSetField

For displaying a set of modifiers on the CheckoutPage which will inject their details into Order Modifications.


Author(s):

Version:

  • 1.0

Copyright:

  • Copyright (c) 2011, Frank Mullenger

Variables

Methods


Child classes:

FlatFeeShippingField
Form fields that represent FlatFeeShippingRates in the Checkout form.

Class Details

[line 12]
For displaying a set of modifiers on the CheckoutPage which will inject their details into Order Modifications.



Tags:

author:  Frank Mullenger <frankmullenger@gmail.com>
version:  1.0
copyright:  Copyright (c) 2011, Frank Mullenger


[ Top ]


Class Variables

$modifier =

[line 27]

To hold the modifier (link FlatFeeShipping) class that will set the value for the order Modification.



Tags:

access:  protected

Type:   Object


[ Top ]

$template =  "ModifierSetField"

[line 19]

Template for rendering



Tags:

access:  protected

Type:   String


[ Top ]



Class Methods


constructor __construct [line 39]

ModifierSetField __construct( name $modifier, [title $title = ""], [source $source = array()], [value $value = ""], [form $form = null])

Creates a new optionset field for order modifers with the naming convention Modifiers[ClassName] where ClassName is name of modifier class.



Parameters:

name   $modifier   The field name, needs to be the class name of the class that is going to be the modifier
title   $title   The field title
source   $source   An map of the dropdown items
value   $value   The current value
form   $form   The parent form

[ Top ]

method FieldHolder [line 53]

String FieldHolder( )

Render field with the appropriate template.



Overridden in child classes as:

FlatFeeShippingField::FieldHolder()
Render field with the appropriate template.

[ Top ]

method getModifier [line 71]

Object getModifier( )

Get the modifier e.g: FlatFeeShipping



Tags:

return:  Mixed object, class depends on type of ModifierSetField e.g: FlatFeeShippingField


[ Top ]

method validate [line 62]

void validate( $validator)

Validation is not currently done on this field at this point.



Overridden in child classes as:

FlatFeeShippingField::validate()
Ensure that the value is the ID of a valid FlatFeeShippingRate and that the FlatFeeShippingRate it represents is valid for the Shipping country being set in the Order.

Parameters:

   $validator  

[ Top ]


Documentation generated on Thu, 08 Mar 2012 16:47:27 +1300 by phpDocumentor 1.4.4