Class SubmitButton (namespace Nette\Forms)


Submittable button control.

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

Implements interfaces:

Direct Known Sub-classes:

Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Forms/Controls/SubmitButton.php (line 24)
Public Method Summary
SubmitButton
__construct ([string $caption = NULL])
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.
SubmitButton
setValue (bool $value)
Sets 'pressed' indicator.
static bool
Submitted validator: has been button pressed?
Methods Inherited From Button
__construct(), getControl(), getLabel()
Methods Inherited From FormControl
__construct(), addCondition(), addConditionOn(), addError(), addRule(), attached(), cleanErrors(), getControl(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), getValue(), hasErrors(), isDisabled(), isRendered(), isRequired(), loadHttpData(), notifyRule(), setDefaultValue(), setDisabled(), setHtmlId(), setOption(), setRendered(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods Inherited From Component
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup()
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
array $onClick

line 27

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

line 30

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

Method Details

line 40

__construct

public SubmitButton __construct ([string $caption = NULL])

Overridden in child classes as:

Input
string $caption caption
Output
SubmitButton  

line 106

click

public void click ()

Fires click event.

Output
void  

line 95

getValidationScope

public mixed getValidationScope ()

Gets the validation scope.

Output
mixed  

line 70

isSubmittedBy

public bool isSubmittedBy ()

Tells if the form was submitted by this button.

Output
bool  

line 82

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 53

setValue

public SubmitButton setValue (bool $value)

Sets 'pressed' indicator.

Implementation of:

Input
bool $value
Output
SubmitButton provides a fluent interface

line 118

validateSubmitted

public static bool validateSubmitted (ISubmitterControl $control)

Submitted validator: has been button pressed?

Input
ISubmitterControl $control
Output
bool