Property | Type | Description | |
---|---|---|---|
$_cols | |||
$_matrix | |||
$_new_input | |||
$_rows |
Method | Description | |
---|---|---|
about ( ) | ||
getCols ( ) | ||
getInfo ( &$vars, &$var, &$info ) | ||
getMatrix ( ) | ||
getNewInput ( ) | ||
getRows ( ) | ||
init ( array $cols, array $rows = [], array $matrix = [], boolean | array $new_input = false ) | Initializes the variable. | |
isValid ( &$var, &$vars, $value, &$message ) |
init(array('Column A', 'Column B'),
array(1 => 'Row One', 2 => 'Row 2', 3 => 'Row 3'),
array(array(true, true, false),
array(true, false, true),
array(fasle, true, false)),
array('Row 4', 'Row 5'));
public init ( array $cols, array $rows = [], array $matrix = [], boolean | array $new_input = false ) | ||
$cols | array | A list of column headers. |
$rows | array | A hash with row IDs as the keys and row labels as the values. |
$matrix | array | A two dimensional hash with the field values. |
$new_input | boolean | array | If true, a free text field to add a new row is displayed on the top, a select box if this parameter is a value. |