'email' => ts('Domain (organization) email'),
'id' => ts('Domain ID'),
'description' => ts('Domain Description'),
+ 'now' => ts('Current time/date'),
];
}
* @throws \CRM_Core_Exception
*/
public function evaluateToken(TokenRow $row, $entity, $field, $prefetch = NULL): void {
+ if ($field === 'now') {
+ $nowObj = (new \DateTime())->setTimestamp(\CRM_Utils_Time::time());
+ $row->format('text/html')->tokens($entity, $field, $nowObj);
+ return;
+ }
$row->format('text/html')->tokens($entity, $field, self::getDomainTokenValues()[$field]);
$row->format('text/plain')->tokens($entity, $field, self::getDomainTokenValues(NULL, FALSE)[$field]);
}