Brimbox Logo Brimbox Version 2.3.4 Released

return_header>>

Outputs a header for a given row, including the id, record type, record create date and modify date. Optionally a link to cascade the parent record is available and the secure and archive flags are outputted.

Class: bb_main, called as $main

File: bb_main.php (php)

Declaration:

function return_header($row, $target, $params = array())

Usage:

$main->return_header($row, $target, $params);

Outputs: Record header with layout letter (corresponds to row_type), record id (or number), date and time of last update and record creation. Optional link to Cascade record or other module and marks indicating archive and secure levels.

Parameter: $row (array, db resultset row)
The database $row contains a data_table record to produce header on. Row must have columns id and row_type if called. Optionally if $params['link'] = 1 must have row_type_left, hdr, and key1 fields. If $params['mark'] = 1 must have secure and archive fields.

Parameter: $target (string)
If $params['link'] is 1, $target will be module name (usually bb_cascade) linked to the parent record. Note that if you are going to use this option, you must left join in SQL to the parent record and get row_type_left, hdr, and key1 fields. The link to the parent record is called from the javascript class bb_link, so use $params['link'] = 1 when integrating a custom module in the standard interface.

Parameter: $params (optional array)
The parameters array for passing custom parameters to the function.

Optional Parameters:

  • link, whether to include the header link when returning records (integer, default 1)
  • mark, whether to include the archive and secure marks when returning records. (integer, default 1)

 

Updated: 2016-07-17