jFormsStaticDatasource

Implements \jIFormsDatasource2

A datasource which is based on static values.

package

jelix

subpackage

forms

Methods

getData

getData( $form) 

Arguments

$form

getLabel

getLabel( $key) 

Arguments

$key

Return the label corresponding to the given key.

getLabel2(string $key, \jFormsBase $form) : string

It replace getLabel so it should be called instead of getLabel.

Arguments

$key

string

the key

$form

\jFormsBase

the form

Response

string

the label

Says if data are grouped, ie, if getData() returns a simple array value=>label (false) or if it returns an array of simple arrays array('group label'=>array(value=>label,)) (true)

hasGroupedData() : boolean

Response

boolean

set a parameter indicating how data are grouped

setGroupBy(string $group) 

Arguments

$group

string

the group parameter

Properties

associative array which contains keys and labels

data : array
var

Type(s)

array

grouped

grouped : 

Type(s)