Public Member Functions | Public Attributes

FormControlSubmit Class Reference

Inheritance diagram for FormControlSubmit:
Collaboration diagram for FormControlSubmit:

List of all members.

Public Member Functions

 _extend ()
 set_caption ($caption)
 set_url ($url)
 get (Theme $theme)
 do_success ($form)
 validate ()

Public Attributes

 $caption
 $on_success = array()

Detailed Description

A submit control based on FormControl for output via FormUI

Definition at line 8 of file formcontrolsubmit.php.


Member Function Documentation

FormControlSubmit::_extend (  ) 

Called upon construct. Sets control properties

Reimplemented from FormControl.

Definition at line 16 of file formcontrolsubmit.php.

FormControlSubmit::do_success ( form  ) 

This control only executes its on_success callbacks when it was clicked

Parameters:
FormUI $form The form to which this control belongs
Returns:
bool|string A string to replace the rendering of the form with, or false

Reimplemented from FormControl.

Definition at line 68 of file formcontrolsubmit.php.

FormControlSubmit::get ( Theme theme  ) 

Produce HTML output for this password control.

Parameters:
Theme $theme The theme to use to render this control
Returns:
string HTML for this control in the form

Reimplemented from FormControl.

Definition at line 49 of file formcontrolsubmit.php.

FormControlSubmit::set_caption ( caption  ) 

Set the caption of this submit button

Parameters:
string $caption The caption to set
Returns:
FormControlSubmit $this

Definition at line 26 of file formcontrolsubmit.php.

FormControlSubmit::set_url ( url  ) 

Make this submit button go to a URL instead of validating or processing success

Parameters:
string $url The URL to redirect to
Returns:
FormControlSubmit $this Fluent interface

Definition at line 37 of file formcontrolsubmit.php.

FormControlSubmit::validate (  ) 

This control only validates if it's clicked

Returns:
array If empty, no errors. One string element describing each error

Reimplemented from FormControl.

Definition at line 80 of file formcontrolsubmit.php.


The documentation for this class was generated from the following file: