jIFormsDatasource

Extends

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

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

getData(\jFormsBase $form) : array

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

Arguments

$key

string

the key

Response

string

the label