PHP Class Common\Core\Form

Inheritance: extends SpoonForm
Show file Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Property Type Description
$URL Backend\Core\Engine\Url The URL instance
$header Backend\Core\Engine\Header The header instance

Public Methods

Method Description
addCheckbox ( string $name, boolean $checked = false, string $class = null, string $classError = null ) : CommonFormCheckbox Adds a single checkbox.
addDropdown ( string $name, array $values = null, string $selected = null, boolean $multipleSelection = false, string $class = null, string $classError = null ) : SpoonFormDropdown Adds a single dropdown.
addMultiCheckbox ( string $name, array $values, mixed $checked = null, string $class = null ) : SpoonFormMultiCheckbox Adds a multiple checkbox.
addPassword ( string $name, string $value = null, integer $maxLength = null, string $class = null, string $classError = null, boolean $HTML = false ) : SpoonFormPassword Adds a single password field.
addRadiobutton ( string $name, array $values, string $checked = null, string $class = null ) : SpoonFormRadiobutton Adds a single radio button.
addText ( string $name, string $value = null, integer $maxLength = 255, string $class = null, string $classError = null, boolean $HTML = true ) : SpoonFormText Adds a single textfield.
addTextarea ( string $name, string $value = null, string $class = null, string $classError = null, boolean $HTML = true ) : SpoonFormTextarea Adds a single textarea.
addTime ( string $name, string $value = null, string $class = null, string $classError = null ) : SpoonFormTime Adds a single time field.
getUploadMaxFileSize ( ) : string | null

Method Details

addCheckbox() public method

Adds a single checkbox.
public addCheckbox ( string $name, boolean $checked = false, string $class = null, string $classError = null ) : CommonFormCheckbox
$name string The name of the element.
$checked boolean Should the checkbox be checked?
$class string Class(es) that will be applied on the element.
$classError string Class(es) that will be applied on the element when an error occurs.
return CommonFormCheckbox

addDropdown() public method

Adds a single dropdown.
public addDropdown ( string $name, array $values = null, string $selected = null, boolean $multipleSelection = false, string $class = null, string $classError = null ) : SpoonFormDropdown
$name string Name of the element.
$values array Values for the dropdown.
$selected string The selected elements.
$multipleSelection boolean Is it possible to select multiple items?
$class string Class(es) that will be applied on the element.
$classError string Class(es) that will be applied on the element when an error occurs.
return SpoonFormDropdown

addMultiCheckbox() public method

Adds a multiple checkbox.
public addMultiCheckbox ( string $name, array $values, mixed $checked = null, string $class = null ) : SpoonFormMultiCheckbox
$name string The name of the element.
$values array The values for the checkboxes.
$checked mixed Should the checkboxes be checked?
$class string Class(es) that will be applied on the element.
return SpoonFormMultiCheckbox

addPassword() public method

Adds a single password field.
public addPassword ( string $name, string $value = null, integer $maxLength = null, string $class = null, string $classError = null, boolean $HTML = false ) : SpoonFormPassword
$name string The name of the field.
$value string The value for the field.
$maxLength integer The maximum length for the field.
$class string Class(es) that will be applied on the element.
$classError string Class(es) that will be applied on the element when an error occurs.
$HTML boolean Will the field contain HTML?
return SpoonFormPassword

addRadiobutton() public method

Adds a single radio button.
public addRadiobutton ( string $name, array $values, string $checked = null, string $class = null ) : SpoonFormRadiobutton
$name string The name of the element.
$values array The possible values for the radio button.
$checked string Should the element be checked?
$class string Class(es) that will be applied on the element.
return SpoonFormRadiobutton

addText() public method

Adds a single textfield.
public addText ( string $name, string $value = null, integer $maxLength = 255, string $class = null, string $classError = null, boolean $HTML = true ) : SpoonFormText
$name string The name of the element.
$value string The value inside the element.
$maxLength integer The maximum length for the value.
$class string Class(es) that will be applied on the element.
$classError string Class(es) that will be applied on the element when an error occurs.
$HTML boolean Will this element contain HTML?
return SpoonFormText

addTextarea() public method

Adds a single textarea.
public addTextarea ( string $name, string $value = null, string $class = null, string $classError = null, boolean $HTML = true ) : SpoonFormTextarea
$name string The name of the element.
$value string The value inside the element.
$class string Class(es) that will be applied on the element.
$classError string Class(es) that will be applied on the element when an error occurs.
$HTML boolean Will the element contain HTML?
return SpoonFormTextarea

addTime() public method

Adds a single time field.
public addTime ( string $name, string $value = null, string $class = null, string $classError = null ) : SpoonFormTime
$name string The name of the element.
$value string The value inside the element.
$class string Class(es) that will be applied on the element.
$classError string Class(es) that will be applied on the element when an error occurs.
return SpoonFormTime

getUploadMaxFileSize() public static method

public static getUploadMaxFileSize ( ) : string | null
return string | null

Property Details

$URL protected property

The URL instance
protected Url,Backend\Core\Engine $URL
return Backend\Core\Engine\Url

$header protected property

The header instance
protected Header,Backend\Core\Engine $header
return Backend\Core\Engine\Header