Class SubmitButton (namespace Nette\Forms)


Submittable button control.

Object
   |
   --Component
      |
      --FormControl
         |
         --Button
            |
            --SubmitButton

Implements interfaces:

Direct Known Sub-classes:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Forms/Controls/SubmitButton.php (line 36)
Public Method Summary
SubmitButton
__construct (string $caption)
void
click ()
Fires click event.
mixed
Gets the validation scope.
bool
Tells if the form was submitted by this button.
SubmitButton
setValidationScope (mixed $scope)
Sets the validation scope. Clicking the button validates only the controls within the specified scope.
static bool
Submitted validator: has been button pressed?
Methods Inherited From Button
__construct(), getControl(), getLabel(), setValue()
Methods Inherited From FormControl
__construct(), addCondition(), addConditionOn(), addError(), addRule(), cleanErrors(), getControl(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), getValue(), hasErrors(), isDisabled(), isRendered(), isRequired(), loadHttpData(), notifyRule(), setDisabled(), setHtmlId(), setOption(), setParent(), setRendered(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods Inherited From Component
__construct(), attached(), detached(), getName(), getParent(), getService(), getServiceLocator(), lookup(), lookupPath(), monitor(), setParent(), setServiceLocator(), validateParent(), __clone(), __wakeup()
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
array $onClick

line 39

of event handlers; Occurs when the button is clicked and form is successfully validated; function(SubmitButton $sender)
array $onInvalidClick

line 42

of event handlers; Occurs when the button is clicked and form is not validated; function(SubmitButton $sender)

Method Details

line 52

__construct

public SubmitButton __construct (string $caption)

Overridden in child classes as:

Input
string $caption caption
Output
SubmitButton  

line 100

click

public void click ()

Fires click event.

Output
void  

line 89

getValidationScope

public mixed getValidationScope ()

Gets the validation scope.

Output
mixed  

line 64

isSubmittedBy

public bool isSubmittedBy ()

Tells if the form was submitted by this button.

Output
bool  

line 76

setValidationScope

public SubmitButton setValidationScope (mixed $scope)

Sets the validation scope. Clicking the button validates only the controls within the specified scope.

Input
mixed $scope
Output
SubmitButton provides a fluent interface

line 112

validateSubmitted

public static bool validateSubmitted (ISubmitterControl $control)

Submitted validator: has been button pressed?

Input
ISubmitterControl $control
Output
bool