Brimbox Logo Brimbox Version 2.3.4 Released

children>>

Method to loop through all the child layouts of a layout creating "View Children" links and "Add Child" links for all child possibilities of a given record.

Class: bb_links, called as $main

File: bb_links.php (php)

Declaration:

function children($row, $arr_layouts, $target_add, $text_add, $target_view, $text_view, $params = array())

Usage:

$main->children($row, $arr_layouts, $target, $text_view, $text_add, $params);

Outputs: Loops through all child layouts of the submitted $row (and therefore row_type) outputting “View” and “Add” links.

Note: Link functions must have the first parameter be $row and the second parameter be $arr_layouts.

Parameter: $row (array, database row)
Valid database row from the data_table.

Parameter: $arr_layouts (array)
Layouts stored as JSON retrieved as PHP array.

Parameter: $target (string)
Module name to be targeted during post, will be the next module loaded.

Parameter: $text_view (string)
Text to prepend the plural layout name of the child record or records in the “View” link.

Parameter: $text_add (string)
Text to prepend the singular layout name of the child record or records in the “Add” link.

Parameter: $params (array)
An optional array containing parameters to include when calling the function.

  • button, button number to be submitted in bb_submit_form(), (integer, default 0).
  • check, if set checks that the layout security is not greater than zero
  • class, the class of the button outputted, default is a link (string, default "link rightmargin")

Updated: 2017-08-15