added PDFTable

This commit is contained in:
Roland Gruber 2015-07-08 19:22:27 +00:00
parent 451c1c5e4c
commit cf9c5c9f70
1 changed files with 24 additions and 21 deletions

View File

@ -197,10 +197,13 @@ class ldapPublicKey extends baseModule {
function get_pdfEntries($pdfKeys) {
$return = array();
if (sizeof($this->attributes['sshPublicKey']) > 0) {
$return['ldapPublicKey_sshPublicKey'][0] = '<block><key>' . _('SSH public keys') . '</key><tr><td align=\"L\">' . $this->attributes['sshPublicKey'][0] . '</td></tr></block>';
for ($i = 1; $i < sizeof($this->attributes['sshPublicKey']); $i++) {
$return['ldapPublicKey_sshPublicKey'][] = '<block><tr><td align=\"L\">' . $this->attributes['sshPublicKey'][$i] . '</td></tr></block>';
$pdfTable = new PDFTable(_('SSH public keys'));
for ($i = 0; $i < sizeof($this->attributes['sshPublicKey']); $i++) {
$pdfRow = new PDFTableRow();
$pdfRow->cells[] = new PDFTableCell($this->attributes['sshPublicKey'][$i]);
$pdfTable->rows[] = $pdfRow;
}
$this->addPDFTable($return, 'sshPublicKey', $pdfTable);
}
return $return;
}