->tokens('contact', $token, "cs={$cs}");
}
elseif ($token === 'signature_html') {
- $row->format('text/html')->tokens('contact', $token, html_entity_decode($row->context['contact'][$token]));
+ $row->format('text/html')->tokens('contact', $token, html_entity_decode($this->getFieldValue($row, $token)));
}
else {
parent::evaluateToken($row, $this->entity, $token, $row->context['contact']);
foreach ($this->getRelatedEntityTokenMetadata() as $entity => $exposedFields) {
$apiEntity = ($entity === 'openid') ? 'OpenID' : ucfirst($entity);
+ if ($apiEntity === 'Im') {
+ $apiEntity = 'IM';
+ }
$metadata = (array) civicrm_api4($apiEntity, 'getfields', ['checkPermissions' => FALSE], 'name');
foreach ($metadata as $field) {
$this->addFieldToTokenMetadata($tokensMetadata, $field, $exposedFields, 'primary_' . $entity);