Commit 30ad9dd8 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Form.parameter & FormElement.parameter: Lines starting with '#' are treated as...

Form.parameter & FormElement.parameter: Lines starting with '#' are treated as comments and will not be parsed.

Evaluate.php: parseArray() will skip lines starting with a '#'
parent 0061aa1e
......@@ -599,6 +599,8 @@ parameter
* The following parameter are optional and can be configured in the *Form.parameter* field.
* Comments: lines starting with a '#' are treated as a comment and will not be parsed.
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| Name | Type | Description |
+========================+========+==========================================================================================================+
......@@ -710,6 +712,10 @@ FormElements
* Ordering and grouping: Native *FormElements* and Container-Elements (both with feIdContainer=0) will be ordered by 'ord'.
* Inside of a container, all nested elements will be displayed.
* Technical, it's *not* necessary to configure a FormElement for the primary index column `id`.
* Additional options to a *FormElement* will be configured via the *FormElement.parameter* field (analog to *Form.parameter*
for *Forms* ).
* Comments: lines starting with a '#' are treated as a comment and will not be parsed.
.. _class-container:
......
......@@ -51,7 +51,7 @@ class Evaluate {
* @param $tokenArray
* @param array $skip Optional Array with keynames, which will not be evaluated.
* @param array $debugStack
* @return mixed
* @return array
* @throws UserFormException
*/
public function parseArray($tokenArray, array $skip = array(), &$debugStack = array()) {
......@@ -67,7 +67,12 @@ class Evaluate {
if (is_array($value)) {
$arr[] = $this->parseArray($value, $skip);
} else {
$arr[$key] = $this->parse($value, 0, $debugStack);
$value = trim($value);
// Skip comments.
if(substr($value,0,1)!='#') {
$arr[$key] = $this->parse($value, 0, $debugStack);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment