added addPDFKeyValue()
This commit is contained in:
parent
acd5de4abf
commit
3d0ddd7708
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue