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

Class FormAction

Description

Single action button.

The action buttons are <input type="submit"> tags.

Located in /sapphire/forms/FormAction.php (line 8)

Object
   |
   --ViewableData
      |
      --RequestHandlingData
         |
         --FormField
            |
            --FormAction
Direct descendents
Class Description
AjaxFormAction Action button with Ajax/JavaScript overloading.
FormAction_WithoutLabel
ResetFormAction Action that clears all fields on a form.
ConfirmedFormAction Action button with confirmation text.
ImageFormAction Action that uses an image instead of a button
Variable Summary
mixed $action
mixed $extraData
boolean $useButtonTag
Method Summary
static void create ( $action, [ $title = ""], [ $extraData = null], [ $extraClass = null])
FormAction __construct (action $action, [title $title = ""], [form $form = null], [extraData $extraData = null], [extraClass $extraClass = ''])
void actionName ()
void extraData ()
HTML Field ()
void readonlyField ()
void setFullAction ( $fullAction)
Variables
Methods
static method create (line 38)
static void create ( $action, [ $title = ""], [ $extraData = null], [ $extraClass = null])
  • $action
  • $title
  • $extraData
  • $extraClass

Redefinition of:
Object::create()
Create allows us to override the standard classes of sapphire with our own custom classes.
Constructor __construct (line 31)

Create a new action button.

FormAction __construct (action $action, [title $title = ""], [form $form = null], [extraData $extraData = null], [extraClass $extraClass = ''])
  • action $action: The method to call when the button is clicked
  • title $title: The label on the button
  • form $form: The parent form, auto-set when the field is placed inside a form
  • extraData $extraData: A piece of extra data that can be extracted with $this->extraData. Useful for calling $form->buttonClicked()->extraData()
  • extraClass $extraClass: A CSS class to apply to the button in addition to 'action'

Redefinition of:
FormField::__construct()
Create a new field.

Redefined in descendants as:
actionName (line 42)
void actionName ()
extraData (line 54)
void extraData ()
Field (line 64)

Create a submit input, or button tag using FormField->createTag() functionality.

  • return: code for the input OR button element
HTML Field ()

Redefinition of:
FormField::Field()
Returns the form field - used by templates.

Redefined in descendants as:
performReadonlyTransformation (line 93)

Does not transform to readonly by purpose.

Globally disabled buttons would break the CMS.

void performReadonlyTransformation ()

Redefinition of:
FormField::performReadonlyTransformation()
Returns a readonly version of this field
readonlyField (line 98)
void readonlyField ()
setFullAction (line 50)

Set the full action name, including action_

This provides an opportunity to replace it with something else

void setFullAction ( $fullAction)
  • $fullAction

Inherited Methods

Inherited From FormField

FormField::__construct()
FormField::addExtraClass()
FormField::attrName()
FormField::attrTitle()
FormField::attrValue()
FormField::createTag()
FormField::dataValue()
FormField::debug()
FormField::describe()
FormField::extraClass()
FormField::Field()
FormField::FieldHolder()
FormField::forTemplate()
FormField::getForm()
FormField::getTabIndex()
FormField::getTabIndexHTML()
FormField::hasClass()
FormField::hasData()
FormField::id()
FormField::isComposite()
FormField::isDisabled()
FormField::isReadonly()
FormField::jsValidation()
FormField::LeftTitle()
FormField::Link()
FormField::Message()
FormField::MessageType()
FormField::Name()
FormField::name_to_label()
FormField::performDisabledTransformation()
FormField::performReadonlyTransformation()
FormField::removeExtraClass()
FormField::Required()
FormField::RightTitle()
FormField::rootFieldSet()
FormField::saveInto()
FormField::setContainerFieldSet()
FormField::setDisabled()
FormField::setError()
FormField::setForm()
FormField::setLeftTitle()
FormField::setName()
FormField::setReadonly()
FormField::setRightTitle()
FormField::setTabIndex()
FormField::setTitle()
FormField::setValue()
FormField::SmallFieldHolder()
FormField::Title()
FormField::transform()
FormField::Type()
FormField::validate()
FormField::Value()

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:41:09 +1300 by phpDocumentor 1.3.2