* replace %*% text variables in thresholds * * @param array $thresholds * @return array */
($thresholds)
| 34 | * @return array |
| 35 | */ |
| 36 | public function replaceThresholdsVariables($thresholds) { |
| 37 | foreach ($thresholds as &$threshold) { |
| 38 | $fields = ['value']; |
| 39 | foreach ($fields as $field) { |
| 40 | isset($threshold[$field]) ? $name = $threshold[$field] : $name = ''; |
| 41 | $parsed = $this->parseFilter($name); |
| 42 | if (!$parsed) break; |
| 43 | $threshold[$field] = $parsed['6$startDate']; |
| 44 | } |
| 45 | } |
| 46 | return $thresholds; |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * replace %*% text variables in name and subheader |