}
/**
- * Get the name of the field which holds the ID of the given entity.
- *
* @return string
*/
- private function getEntityIDFieldName(): string {
- return 'activity_id';
+ private function getEntityContextSchema(): string {
+ return 'activityId';
}
/**
// Find all the entity IDs
$entityIds
= $e->getTokenProcessor()->getContextValues('actionSearchResult', 'entityID')
- + $e->getTokenProcessor()->getContextValues($this->getEntityIDFieldName());
+ + $e->getTokenProcessor()->getContextValues($this->getEntityContextSchema());
if (!$entityIds) {
return NULL;
/**
* @inheritDoc
- *
- * @throws \CRM_Core_Exception
*/
public function evaluateToken(\Civi\Token\TokenRow $row, $entity, $field, $prefetch = NULL) {
// maps token name to api field
];
// Get ActivityID either from actionSearchResult (for scheduled reminders) if exists
- $activityId = $row->context['actionSearchResult']->entityID ?? $row->context[$this->getEntityIDFieldName()];
+ $activityId = $row->context['actionSearchResult']->entityID ?? $row->context[$this->getEntityContextSchema()];
$activity = (object) $prefetch['activity'][$activityId];