Comments: on this page. Click to read or post your own.

Class Order_CancelForm

Description

Base class for all forms.

The form class is an extensible base for all forms on a sapphire application. It can be used either by extending it, and creating processor methods on the subclass, or by creating instances of form whose actions are handled by the parent controller.

In either case, if you want to get a form to do anything, it must be inextricably tied to a controller. The constructor is passed a controller and a method on that controller. This method should return the form object, and it shouldn't require any arguments. Parameters, if necessary, can be passed using the URL or get variables. These restrictions are in place so that we can recreate the form object upon form submission, without the use of a session, which would be too resource-intensive.

You will need to create at least one method for processing the submission (through FormAction). This method will be passed two parameters: the raw request data, and the form object. Usually you want to save data into a DataObject by using saveInto(). If you want to process the submitted data in any way, please use getData() rather than the raw request data.

Located in /ecommerce/code/model/Order.php (line 761)

Object
   |
   --ViewableData
      |
      --RequestHandlingData
         |
         --Form
            |
            --Order_CancelForm
Method Summary
Order_CancelForm __construct ( $controller,  $name,  $orderID)
void doCancel (array $data, Form $form)
Variables
Methods
Constructor __construct (line 763)
Order_CancelForm __construct ( $controller,  $name,  $orderID)
  • $controller
  • $name
  • $orderID

Redefinition of:
Form::__construct()
Create a new form, with the given fields an action buttons.
doCancel (line 786)

Form action handler for Order_CancelForm.

Take the order that this was to be change on, and set the status that was requested from the form request data.

void doCancel (array $data, Form $form)
  • array $data: The form request data submitted
  • Form $form: The Form this was submitted on

Inherited Methods

Inherited From Form

Form::__construct()
Form::Actions()
Form::addErrorMessage()
Form::buttonClicked()
Form::callfieldmethod()
Form::clearMessage()
Form::Controller()
Form::current_action()
Form::dataFieldByName()
Form::debug()
Form::defaultAction()
Form::disableDefaultAction()
Form::disableSecurityToken()
Form::disable_all_security_tokens()
Form::FieldMap()
Form::Fields()
Form::forAjaxTemplate()
Form::FormAction()
Form::FormAttributes()
Form::FormEncType()
Form::formHtmlContent()
Form::FormHttpMethod()
Form::FormMethod()
Form::FormName()
Form::forTemplate()
Form::getData()
Form::getExtraFields()
Form::getMessageFromSession()
Form::getRecord()
Form::getValidator()
Form::handleField()
Form::HiddenFields()
Form::httpSubmission()
Form::loadDataFrom()
Form::loadNonBlankDataFrom()
Form::makeReadonly()
Form::Message()
Form::messageForForm()
Form::MessageType()
Form::Name()
Form::renderWithoutActionButton()
Form::resetData()
Form::resetField()
Form::resetValidation()
Form::saveInto()
Form::securityTokenEnabled()
Form::sessionMessage()
Form::setActions()
Form::setButtonClicked()
Form::setFields()
Form::setFormAction()
Form::setFormMethod()
Form::setHTMLID()
Form::setMessage()
Form::setTarget()
Form::setValidator()
Form::set_current_action()
Form::single_field_required()
Form::testAjaxSubmission()
Form::testSubmission()
Form::transform()
Form::transformTo()
Form::unsetActionByName()
Form::unsetAllActions()
Form::unsetDataFieldByName()
Form::unsetFieldFromTab()
Form::unsetValidator()
Form::validate()

Inherited From RequestHandlingData

RequestHandlingData::checkAccessAction()
RequestHandlingData::getRequest()
RequestHandlingData::handleRequest()
RequestHandlingData::httpError()

Inherited From ViewableData

ViewableData::ATT_val()
ViewableData::BaseHref()
ViewableData::buildCastingHelperCache()
ViewableData::cachedCall()
ViewableData::castingHelper()
ViewableData::castingHelperPair()
ViewableData::castingObjectCreator()
ViewableData::castingObjectCreatorPair()
ViewableData::CSSClasses()
ViewableData::CurrentMember()
ViewableData::CurrentPage()
ViewableData::customise()
ViewableData::Debug()
ViewableData::defineMethods()
ViewableData::escapeTypeForField()
ViewableData::Even()
ViewableData::EvenOdd()
ViewableData::First()
ViewableData::FirstLast()
ViewableData::getField()
ViewableData::getIterator()
ViewableData::getXMLValues()
ViewableData::hasField()
ViewableData::HasPerm()
ViewableData::hasValue()
ViewableData::i18nLocale()
ViewableData::IsAjax()
ViewableData::iteratorProperties()
ViewableData::JS_val()
ViewableData::Last()
ViewableData::Me()
ViewableData::Middle()
ViewableData::MiddleString()
ViewableData::obj()
ViewableData::Odd()
ViewableData::Pos()
ViewableData::RAW_val()
ViewableData::renderWith()
ViewableData::SecurityID()
ViewableData::setCustomisedObj()
ViewableData::setField()
ViewableData::SQL_val()
ViewableData::ThemeDir()
ViewableData::Top()
ViewableData::TotalItems()
ViewableData::val()
ViewableData::XML_val()
ViewableData::__get()
ViewableData::__isset()
ViewableData::__set()

Inherited From Object

Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::hasExtension()
Object::hasMethod()
Object::invokeWithExtensions()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::useCustomClass()
Object::__call()
Object::__toString()
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:43:42 +1300 by phpDocumentor 1.3.2