jIFormsDynamicDatasource

Extends \jIFormsDatasource2

Interface for objects which provides a source of data to fill some controls in a form, like menulist, listbox etc.

..

package

jelix

subpackage

forms

Methods

Return the list of controls name that provide criterion values

getCriteriaControls() : array<mixed,string>

Response

array<mixed,string>

load and returns data to fill a control. The returned array should be an associative array key => label

getData(\jFormsBase $form) : array
inherited

Arguments

$form

\jFormsBase

the form

Response

array

the data

Return the label corresponding to the given key if the class implements also jIFormsDatasource2, you must not call getLabel but getLabel2

getLabel(string $key) : string
inherited

Arguments

$key

string

the key

Response

string

the label

Return the label corresponding to the given key.

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

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
inherited

Response

boolean

set the list of controls name that provide critrion values

setCriteriaControls(array<mixed,string> $criteriaFrom = null) 

Arguments

$criteriaFrom

array<mixed,string>

set a parameter indicating how data are grouped

setGroupBy(string $group) 
inherited

Arguments

$group

string

the group parameter