Field
class Field
This class allows the storage and retrieval of the attributes of a field.
A field is an element of the page displayed on the browser in which a data is entered or restituted. A field is therefore always linked to a data item.
In G6K, a field is always contained in a field set.
Properties
private FieldSet | $fieldset | ||
private int | $position | ||
private bool | $newline | ||
private int | $data | ||
private string | $label | ||
private string | $usage | ||
private string | $prompt | ||
private bool | $required | ||
private bool | $visibleRequired | ||
private bool | $colon | ||
private bool | $underlabel | ||
private bool | $help | ||
private bool | $emphasize | ||
private string | $explanation | ||
private string | $widget | ||
private bool | $expanded | ||
private FieldNote | $preNote | ||
private FieldNote | $postNote | ||
private bool | $displayable |
Methods
Returns the FieldSet object that contains this field
Returns the position of this field in the field set.
Sets the position of this field in the field set.
Returns the newline attribute of this Field object
Returns the newline attribute of this Field object
Determines whether the display of this field and its label should start on a new line or not.
Returns the ID of the data item displayed or fed by this field.
Sets the ID of the data item displayed or fed by this field.
Returns the label of this field.
Sets the label of this field.
Returns the usage of this field.
Sets the usage of this field.
Returns the text to appear in the list box when no item is selected.
Sets the text to appear in the list box when no item is selected.
Returns the required attribute of this field.
Returns the required attribute of this field.
Determines whether the field entry is mandatory or not.
Returns the required attribute of this field when displayed.
Returns the required attribute of this field when displayed.
Determines whether the field entry is mandatory or not when displayed.
Returns the colon attribute of this field.
Returns the colon attribute of this field.
Determines whether a colon should be displayed after the label of this field.
Returns the underlabel attribute of this field.
Returns the underlabel attribute of this field.
Determines whether the field should be displayed below its label and not to its right.
Returns the help attribute of this field.
Returns the help attribute of this field.
Determines whether the description of the data linked to this field should be displayed as help text
Returns the emphasize attribute of this field.
Returns the emphasize attribute of this field.
Determines whether the label of the field should be emphasized or not.
Returns the text explaining to the user how the field value was calculated.
Sets a text explaining to the user how the field value was calculated.
Returns the expanded attribute of this field.
Returns the expanded attribute of this field.
Detrmines whether all the elements of a list of choices must be visible or not.
Returns the name of the widget associated with this field.
Sets the name of the widget associated with this field.
Returns the note associated with this field that is displayed above the field.
Sets the note associated with this field that should be displayed above the field.
Returns the note associated with this field that is displayed below the field.
Sets the note associated with this field that should be displayed below the field.
Returns the displayable attribute of this Field object
Returns the displayable attribute of this Field object
Determines whether this field can be displayed or not
Returns the class name of this Field object
Details
at line 205
void
__construct(FieldSet $fieldset, int $position, int $data, string $label)
Constructor of class Field
at line 219
FieldSet
getFieldSet()
Returns the FieldSet object that contains this field
at line 230
int
getPosition()
Returns the position of this field in the field set.
at line 242
void
setPosition(int $position)
Sets the position of this field in the field set.
at line 255
bool
isNewline()
Returns the newline attribute of this Field object
If true, the class 'newline' is added to HTML container of the field. A css rule can therefore be used to place this field on a new line.
at line 268
bool
getNewline()
Returns the newline attribute of this Field object
If true, the class 'newline' is added to HTML container of the field. A css rule can therefore be used to place this field on a new line.
at line 282
void
setNewline(bool $newline)
Determines whether the display of this field and its label should start on a new line or not.
If true, the class 'newline' is added to HTML container of the field. A css rule can therefore be used to place this field on a new line.
at line 293
int
getData()
Returns the ID of the data item displayed or fed by this field.
at line 305
void
setData(int $data)
Sets the ID of the data item displayed or fed by this field.
at line 316
string
getLabel()
Returns the label of this field.
at line 328
void
setLabel(string $label)
Sets the label of this field.
at line 339
string
getUsage()
Returns the usage of this field.
at line 355
void
setUsage(string $usage)
Sets the usage of this field.
if usage is "input", the user can enter a value in the field that will be assigned to the data related to this field
if usage is "output", the value of the related data item is displayed as static field.
at line 368
string
getPrompt()
Returns the text to appear in the list box when no item is selected.
This text applies only to an associated data of type "choice" or "multichoice" whose field is displayed as a list box (expanded = false).
at line 382
void
setPrompt(string $prompt)
Sets the text to appear in the list box when no item is selected.
This text applies only to an associated data of type "choice" or "multichoice" whose field is displayed as a list box (expanded = false).
at line 393
bool
isRequired()
Returns the required attribute of this field.
at line 404
bool
getRequired()
Returns the required attribute of this field.
at line 416
void
setRequired(bool $required)
Determines whether the field entry is mandatory or not.
at line 427
bool
isVisibleRequired()
Returns the required attribute of this field when displayed.
at line 438
bool
getVisibleRequired()
Returns the required attribute of this field when displayed.
at line 450
void
setVisibleRequired(bool $visibleRequired)
Determines whether the field entry is mandatory or not when displayed.
at line 461
bool
hasColon()
Returns the colon attribute of this field.
at line 472
bool
getColon()
Returns the colon attribute of this field.
at line 484
void
setColon(bool $colon)
Determines whether a colon should be displayed after the label of this field.
at line 497
bool
isUnderlabel()
Returns the underlabel attribute of this field.
If true, the class 'underlabel' is added to HTML container of the field. A css rule can therefore be used to place this field under its label on a new line.
at line 510
bool
getUnderlabel()
Returns the underlabel attribute of this field.
If true, the class 'underlabel' is added to HTML container of the field. A css rule can therefore be used to place this field below its label on a new line.
at line 524
void
setUnderlabel(bool $underlabel)
Determines whether the field should be displayed below its label and not to its right.
If true, the class 'underlabel' is added to HTML container of the field. A css rule can therefore be used to place this field below its label on a new line.
at line 537
bool
hasHelp()
Returns the help attribute of this field.
If the value is true, the description of the data is displayed in a foldable area below the field, visible after the user clicks on an icon.
at line 550
bool
getHelp()
Returns the help attribute of this field.
If the value is true, the description of the data is displayed in a foldable area below the field, visible after the user clicks on an icon.
at line 564
void
setHelp(bool $help)
Determines whether the description of the data linked to this field should be displayed as help text
If the value is true, the description of the data is displayed in a foldable area below the field, visible after the user clicks on an icon.
at line 577
bool
isEmphasized()
Returns the emphasize attribute of this field.
If true, the class 'emphasized' is added to HTML container of the label. A css rule can therefore be used to emphasize (highlight) the label.
at line 590
bool
getEmphasize()
Returns the emphasize attribute of this field.
If true, the class 'emphasized' is added to HTML container of the label. A css rule can therefore be used to emphasize (highlight) the label.
at line 604
void
setEmphasize(bool $emphasize)
Determines whether the label of the field should be emphasized or not.
If true, the class 'emphasized' is added to HTML container of the label. A css rule can therefore be used to emphasize (highlight) the label.
at line 615
string
getExplanation()
Returns the text explaining to the user how the field value was calculated.
at line 627
void
setExplanation(string $explanation)
Sets a text explaining to the user how the field value was calculated.
at line 640
bool
isExpanded()
Returns the expanded attribute of this field.
if true, radio buttons are displayed instead of a list box if it is a data of type 'choice' or checkboxes if it is a data of type 'multichoice'
at line 653
bool
getExpanded()
Returns the expanded attribute of this field.
if true, radio buttons are displayed instead of a list box if it is a data of type 'choice' or checkboxes if it is a data of type 'multichoice'
at line 667
void
setExpanded(bool $expanded)
Detrmines whether all the elements of a list of choices must be visible or not.
if true, radio buttons are displayed instead of a list box if it is a data of type 'choice' or checkboxes if it is a data of type 'multichoice'
at line 682
string
getWidget()
Returns the name of the widget associated with this field.
A widget is a small Javascript component to make it easier to enter a field.
Read the file src/EUREKA/G6KBundle/Resources/config/parameters.yml to see the list of available widgets and their definition.
at line 698
void
setWidget(string $widget)
Sets the name of the widget associated with this field.
A widget is a small Javascript component to make it easier to enter a field.
Read the file src/EUREKA/G6KBundle/Resources/config/parameters.yml to see the list of available widgets and their definition.
at line 709
FieldNote
getPreNote()
Returns the note associated with this field that is displayed above the field.
at line 721
void
setPreNote(FieldNote $preNote)
Sets the note associated with this field that should be displayed above the field.
at line 732
FieldNote
getPostNote()
Returns the note associated with this field that is displayed below the field.
at line 744
void
setPostNote(FieldNote $postNote)
Sets the note associated with this field that should be displayed below the field.
at line 755
bool
isDisplayable()
Returns the displayable attribute of this Field object
at line 766
bool
getDisplayable()
Returns the displayable attribute of this Field object
at line 778
void
setDisplayable(bool $displayable)
Determines whether this field can be displayed or not
at line 789
string
getClass()
Returns the class name of this Field object