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

Class: ModifierHiddenField

Source Location: /code/form/ModifierHiddenField.php

Class Overview

HiddenField
   |
   --ModifierHiddenField

For displaying a Modifier on the CheckoutPage which will inject details into Order Modifications.


Author(s):

Version:

  • 1.0

Copyright:

  • Copyright (c) 2011, Frank Mullenger

Variables

Methods


Child classes:

FlatFeeTaxField
Form field that represents FlatFeeTaxRates in the Checkout form.

Class Details

[line 14]
For displaying a Modifier on the CheckoutPage which will inject details into Order Modifications.

The hidden field stores the Modifier ID.




Tags:

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


[ Top ]


Class Variables

$modifier =

[line 29]

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



Tags:

access:  protected

Type:   Object


[ Top ]

$template =  "ModifierHiddenField"

[line 21]

Template for rendering



Tags:

access:  protected

Type:   String


[ Top ]



Class Methods


constructor __construct [line 42]

ModifierHiddenField __construct( name $modifier, [title $title = null], [source $value = ""], [value $maxLength = null], [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   $value   An map of the dropdown items
value   $maxLength   The current value
form   $form   The parent form

[ Top ]

method Description [line 84]

String Description( )

A description to show alongside the hidden field on the CheckoutForm.

For instance, this might be a calculated value.




Tags:

return:  Description of the modifier e.g: a calculated value of tax


Overridden in child classes as:

FlatFeeTaxField::Description()
Return the amount for this tax rate for displaying in the CheckoutForm

[ Top ]

method FieldHolder [line 56]

String FieldHolder( )

Render field with the appropriate template.



Overridden in child classes as:

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

[ Top ]

method getModifier [line 74]

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 65]

void validate( $validator)

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



Overridden in child classes as:

FlatFeeTaxField::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