MCPcopy Create free account
hub / github.com/Rello/analytics / replaceThresholdsVariables

Method replaceThresholdsVariables

lib/Service/VariableService.php:36–47  ·  view source on GitHub ↗

* replace %*% text variables in thresholds * * @param array $thresholds * @return array */

($thresholds)

Source from the content-addressed store, hash-verified

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

Callers 3

readMethod · 0.80
validateMethod · 0.80

Calls 1

parseFilterMethod · 0.95

Tested by 1