protected function formatCompilationTable($data, $css)
{
$th = '<tr>';
foreach ($css->titles as $title) {
$th .= <<<HTML
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{$title}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</th>
HTML;
}
$th .= '</tr>';
$text = <<<HTML
\t\t\t\t\t\t\t\t\t\t\t\t<table class="table">
\t\t\t\t\t\t\t\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>
{$th}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t\t</thead>
\t\t\t\t\t\t\t\t\t\t\t\t\t<tbody>
HTML;
foreach ($data as $v) {
$row = '<tr>';
foreach ($v as $V) {
if (is_array($V)) {
if (empty($V)) {
$row .= "<td> </td>\n";
} else {
$row .= '<td><ul><li>' . implode('</li><li>', $V) . "</li></ul></td>\n";
}
} else {
$row .= "<td>{$V}</td>\n";
}
}
$row .= '</tr>';
$text .= $row;
}
$text .= <<<HTML
\t\t\t\t\t\t\t\t\t\t\t\t\t</tbody>
\t\t\t\t\t\t\t\t\t\t\t\t</table>
HTML;
return $text;
}