Link __construct(
Unit
$unit, [array
$source = NULL]
)
|
|
Instance constructor. Creates object from SQL result row, loads by ID or just leaves blank to be filled later.
Parameters:
Unit |
$unit: |
Reference to parent unit |
array |
$source: |
Query result row or array with params |
API Tags:
Redefinition of:
- Item::__construct()
- Instance constructor. Creates object from SQL result row, loads by ID or just leaves blank to be filled later.
void display(
XTemplate
$tpl, string
$block, [string
$row_block = 'PARAM'], [string
$title_tag = 'PARAM_TITLE'], [string
$value_tag = 'PARAM_VALUE']
)
|
|
Row-based automatic unit render TPL designer specifies parameters implicitly with row block.
TPL example: <!-- BEGIN: MY_UNIT --> <!-- BEGIN: MY_PARAM --> <stong>{PARAM_TITLE}:</strong> {PARAM_VALUE} <!-- END: MY_PARAM --> <!-- END: MY_UNIT -->
Parameters:
XTemplate |
$tpl: |
Layout template object |
string |
$block: |
Full block name to render the object in, e.g. 'MAIN.MY_UNIT' |
string |
$row_block: |
Row block name for parameter row, e.g. 'MY_PARAM' |
string |
$title_tag: |
Tag name for parameter title |
string |
$value_tag: |
Tag name for parameter value |
API Tags:
Redefinition of:
- Item::display()
- Single object display using XTemplate object.
Checks whether instance exists in database
API Tags:
Redefinition of:
- Instance::exists()
- Checks whether instance exists in database
API Tags:
Return: | Primary key value for SQL WHERE |
Access: | protected |
Redefinition of:
- Instance::get_key()