public function __construct(TokenProcessor $tokenProcessor, $key) {
$this->tokenProcessor = $tokenProcessor;
$this->tokenRow = $key;
- $this->format('text/plain'); // Set a default.
+ // Set a default.
+ $this->format('text/plain');
$this->context = new TokenRowContext($tokenProcessor, $key);
}
$customFieldName = "custom_" . $customFieldID;
$record = civicrm_api3($entity, "getSingle", [
'return' => $customFieldName,
- 'id' => $entityID,
+ 'id' => $entityID,
]);
$fieldValue = \CRM_Utils_Array::value($customFieldName, $record, '');
* @return bool
*/
public function offsetExists($offset) {
- return
- isset($this->tokenProcessor->rowContexts[$this->tokenRow][$offset])
+ return isset($this->tokenProcessor->rowContexts[$this->tokenRow][$offset])
|| isset($this->tokenProcessor->context[$offset]);
}