RecordSelector
in package
Record selection HTML widget.
Tags
Table of Contents
Properties
- $accessingClassName : string
- Used to indicate the reading side when accessing from MANY-TO-MANY relation (leave blank for other relation types).
- $label : string
- The label text to use where required.
- $logger : Logger
- Trace logger.
- $name : string
- The name of the HTML input box for storing the hidden and display values.
- $onloadJS : string
- Javascript to run when the widget opens in a new window.
- $relationObject : Relation
- The relation object that we are going to render a view for.
Methods
- __construct() : mixed
- The constructor.
- render() : string
- Renders the text boxes and buttons for the widget, that will appear in user forms.
- renderSelector() : string
- Returns the HTML for the record selector that will appear in a pop-up window.
Properties
$accessingClassName
Used to indicate the reading side when accessing from MANY-TO-MANY relation (leave blank for other relation types).
private
string
$accessingClassName
Tags
$label
The label text to use where required.
private
string
$label
Tags
$logger
Trace logger.
private
static Logger
$logger
= null
Tags
$name
The name of the HTML input box for storing the hidden and display values.
private
string
$name
Tags
$onloadJS
Javascript to run when the widget opens in a new window.
private
string
$onloadJS
= ''
Tags
$relationObject
The relation object that we are going to render a view for.
private
Relation
$relationObject
= null
Tags
Methods
__construct()
The constructor.
public
__construct(Relation $relation[, string $label = '' ][, string $name = '' ][, string $accessingClassName = '' ]) : mixed
Parameters
- $relation : Relation
- $label : string = ''
- $name : string = ''
- $accessingClassName : string = ''
Tags
render()
Renders the text boxes and buttons for the widget, that will appear in user forms.
public
render([bool $expanded = false ][, bool $buttons = true ]) : string
Parameters
- $expanded : bool = false
-
Render the related fields in expanded format or not (optional)
- $buttons : bool = true
-
Render buttons for expanding/contacting the related fields (optional)
Tags
Return values
stringrenderSelector()
Returns the HTML for the record selector that will appear in a pop-up window.
public
renderSelector(string $fieldname[, array<string|int, mixed> $lookupIDs = array() ]) : string
Parameters
- $fieldname : string
-
The hidden HTML form field in the parent to pass values back to.
- $lookupIDs : array<string|int, mixed> = array()
-
An optional array of related look-up IDs, only required for rendering MANY-TO-MANY rels