You are here

public function HeartbeatActivity::delete_button in Heartbeat 6.4

Create the link for a delete button.

File

includes/heartbeatactivity.inc, line 175
HeartbeatActivity object Defines one heartbeat activity object.

Class

HeartbeatActivity
Class defines an activity message object

Code

public function delete_button($args = array()) {
  $attributes = array(
    'query' => drupal_get_destination(),
    'alias' => TRUE,
  );
  if (count($this->uaids) > 1) {
    $attributes['attributes'] = array(
      'onclick' => 'javascript:Drupal.heartbeat.splitGroupedMessage(' . $this->uaid . ', new Array(' . implode(",", $this->uaids) . ')); return false;',
    );
  }
  $attributes += $args;
  return '<span class="hover-delete">' . l(t('Delete'), 'heartbeat/delete/' . $this->uaid, $attributes) . '</span>';
}