Class NSubmitButton


Submittable button control.

NObject
   |
   --NComponent
      |
      --NFormControl
         |
         --NButton
            |
            --NSubmitButton

Implements interfaces:

Direct Known Sub-classes:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Forms/Controls/SubmitButton.php (line 38)
Public Method Summary
NSubmitButton
__construct ([string $caption = NULL])
void
click ()
Fires click event.
mixed
Gets the validation scope.
bool
Tells if the form was submitted by this button.
NSubmitButton
setValidationScope (mixed $scope)
Sets the validation scope. Clicking the button validates only the controls within the specified scope.
NSubmitButton
setValue (bool $value)
Sets 'pressed' indicator.
static bool
Submitted validator: has been button pressed?
Methods Inherited From NButton
__construct(), getControl(), getLabel()
Methods Inherited From NFormControl
__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(), setParent(), setRendered(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods Inherited From NComponent
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup()
Methods Inherited From NObject
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
array $onClick

line 41

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

line 44

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

Method Details

line 54

__construct

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

Overridden in child classes as:

Input
string $caption caption
Output
NSubmitButton  

line 120

click

public void click ()

Fires click event.

Output
void  

line 109

getValidationScope

public mixed getValidationScope ()

Gets the validation scope.

Output
mixed  

line 84

isSubmittedBy

public bool isSubmittedBy ()

Tells if the form was submitted by this button.

Output
bool  

line 96

setValidationScope

public NSubmitButton setValidationScope (mixed $scope)

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

Input
mixed $scope
Output
NSubmitButton provides a fluent interface

line 67

setValue

public NSubmitButton setValue (bool $value)

Sets 'pressed' indicator.

Implementation of:

Input
bool $value
Output
NSubmitButton provides a fluent interface

line 132

validateSubmitted

public static bool validateSubmitted (ISubmitterControl $control)

Submitted validator: has been button pressed?

Input
ISubmitterControl $control
Output
bool