added addPDFKeyValue()

This commit is contained in:
Roland Gruber 2015-03-01 19:20:17 +00:00
parent acd5de4abf
commit 3d0ddd7708
1 changed files with 17 additions and 0 deletions

View File

@ -841,6 +841,23 @@ abstract class baseModule {
$result[get_class($this) . '_' . $name] = array('<block><key>' . $label . '</key><value>' . $value . '</value></block>');
}
/**
* Adds a simple PDF entry with the given key and value.
*
* @param array $result result array (entry will be added here)
* @param String $name ID
* @param String $label label name
* @param mixed $value value as String or array
* @param String $delimiter delimiter if value is array (default: ", ")
*/
public function addPDFKeyValue(&$result, $name, $label, $value, $delimiter = ', ') {
if (is_array($value)) {
natcasesort($value);
$value = implode($delimiter, $value);
}
$result[get_class($this) . '_' . $name] = array('<block><key>' . $label . '</key><value>' . $value . '</value></block>');
}
/**
* Returns an array containing all input columns for the file upload.
*