function displayLifeCycleMatrix($title, $html_field, $db_field, $statuses, $canedit)
{
$columns = array();
$rows = array();
foreach ($statuses as $index_1 => $status_1) {
$columns[$index_1] = $status_1;
$row = array('label' => $status_1, 'columns' => array());
foreach ($statuses as $index_2 => $status_2) {
$content = array('checked' => true);
if (isset($this->fields[$db_field][$index_1][$index_2])) {
$content['checked'] = $this->fields[$db_field][$index_1][$index_2];
}
if ($index_1 == $index_2 || !$canedit) {
$content['readonly'] = true;
}
$row['columns'][$index_2] = $content;
}
$rows[$html_field . "[{$index_1}]"] = $row;
}
Html::showCheckboxMatrix($columns, $rows, array('title' => $title, 'row_check_all' => true, 'col_check_all' => true, 'first_cell' => '<b>' . __("From \\ To") . '</b>'));
}