You are here

function heartbeat_like_comment_preprocess_flag in Heartbeat 8

Implements hook_preprocess_HOOK().

File

modules/heartbeat_like_comment/heartbeat_like_comment.module, line 40

Code

function heartbeat_like_comment_preprocess_flag(&$variables) {

  // Replace the link title with any tokens.
  $token = Drupal::token();
  $variables['title'] = $token
    ->replace($variables['title'], array(
    'flag_id' => $variables['flag']
      ->id(),
    'entity_id' => $variables['flaggable']
      ->id(),
  ));
}