/** * Interprets a string. If it starts with a { like {field:fieldname} * it calls TYPO3 getData function and returns its value, otherwise returns the string * * @param string $operand The operand to be interpreted * @param array $values The GET/POST values * @return string */ public function parseOperand($operand, $values) { if ($operand[0] == '{') { $data = trim($operand, '{}'); $returnValue = $this->globals->getcObj()->getData($data, $values); } else { $returnValue = $operand; } if ($returnValue === NULL) { $returnValue = ''; } return $returnValue; }
/** * Interprets a string. If it starts with a { like {field:fieldname} * it calls TYPO3 getData function and returns its value, otherwise returns the string * * @param string $operand The operand to be interpreted * @param array $values The GET/POST values * @return string */ public static function parseOperand($operand, $values) { if ($operand[0] == '{') { $data = trim($operand, '{}'); $returnValue = \Typoheads\Formhandler\Utility\Globals::getcObj()->getData($data, $values); } else { $returnValue = $operand; } if ($returnValue === NULL) { $returnValue = ''; } return $returnValue; }