PHP Class Habari\FormControlSubmit

Inheritance: extends FormControl
Show file Open project: habari/system

Public Properties

Property Type Description
$caption
$on_success

Public Methods

Method Description
_extend ( ) Called upon construct. Sets control properties
do_success ( FormUI $form ) : boolean | string This control only executes its on_success callbacks when it was clicked
get ( Theme $theme ) : string Produce HTML output for this password control.
set_caption ( string $caption ) : FormControlSubmit Set the caption of this submit button
set_url ( string $url ) : FormControlSubmit Make this submit button go to a URL instead of validating or processing success
validate ( ) : array This control only validates if it's clicked

Method Details

_extend() public method

Called upon construct. Sets control properties
public _extend ( )

do_success() public method

This control only executes its on_success callbacks when it was clicked
public do_success ( FormUI $form ) : boolean | string
$form FormUI The form to which this control belongs
return boolean | string A string to replace the rendering of the form with, or false

get() public method

Produce HTML output for this password control.
public get ( Theme $theme ) : string
$theme Theme The theme to use to render this control
return string HTML for this control in the form

set_caption() public method

Set the caption of this submit button
public set_caption ( string $caption ) : FormControlSubmit
$caption string The caption to set
return FormControlSubmit $this

set_url() public method

Make this submit button go to a URL instead of validating or processing success
public set_url ( string $url ) : FormControlSubmit
$url string The URL to redirect to
return FormControlSubmit $this Fluent interface

validate() public method

This control only validates if it's clicked
public validate ( ) : array
return array If empty, no errors. One string element describing each error

Property Details

$caption public property

public $caption

$on_success public property

public $on_success