You are here

private static function Heartbeat::wrapOwner in Heartbeat 8

1 call to Heartbeat::wrapOwner()
Heartbeat::buildMessage in src/Entity/Heartbeat.php
Builds a message template for a given HeartbeatType

File

src/Entity/Heartbeat.php, line 821

Class

Heartbeat

Namespace

Drupal\heartbeat\Entity

Code

private static function wrapOwner($message, $entities) {
  foreach ($entities as $entity) {
    if ($entity instanceof User) {
      return str_replace('[user:account-name]', '<a class="heartbeat-user" href="user/' . $entity
        ->id() . '">[user:account-name]</a>', $message);
    }
  }
  return $message;
}