Jelix 1.8.13

jIFormsDynamicDatasource extends jIFormsDatasource2

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

..

Tags
subpackage

forms

Table of Contents

getCriteriaControls()  : array<string|int, string>
Return the list of controls name that provide criterion values.
getData()  : array<string|int, mixed>
load and returns data to fill a control. The returned array should be an associative array key => label.
getLabel()  : string
Return the label corresponding to the given key if the class implements also jIFormsDatasource2, you must not call getLabel but getLabel2.
getLabel2()  : string
Return the label corresponding to the given key.
hasGroupedData()  : bool
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).
setCriteriaControls()  : mixed
set the list of controls name that provide criterion values.
setGroupBy()  : mixed
set a parameter indicating how data are grouped.

Methods

getCriteriaControls()

Return the list of controls name that provide criterion values.

public getCriteriaControls() : array<string|int, string>
Tags
Return values
array<string|int, string>

getData()

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

public getData(jFormsBase $form) : array<string|int, mixed>
Parameters
$form : jFormsBase

the form

Tags
Return values
array<string|int, mixed>

the data

getLabel()

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

public getLabel(string $key) : string
Parameters
$key : string

the key

Tags
Return values
string

the label

getLabel2()

Return the label corresponding to the given key.

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

It replaces getLabel() so it should be called instead of getLabel().

Parameters
$key : string

the key

$form : jFormsBase

the form

Tags
Return values
string

the label

hasGroupedData()

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).

public hasGroupedData() : bool
Tags
Return values
bool

setCriteriaControls()

set the list of controls name that provide criterion values.

public setCriteriaControls([array<string|int, string> $criteriaFrom = null ]) : mixed
Parameters
$criteriaFrom : array<string|int, string> = null
Tags
Return values
mixed

setGroupBy()

set a parameter indicating how data are grouped.

public setGroupBy(string $group) : mixed
Parameters
$group : string

the group parameter

Tags
Return values
mixed

Search results