public function HeartbeatFlagAttachmentPlugin::renderButtons in Heartbeat 7
renderButtons().
Overrides iHeartbeatPlugin::renderButtons
File
- modules/
heartbeat_plugins/ plugins/ flagattachment.inc, line 134
Class
- HeartbeatFlagAttachmentPlugin
- Class HeartbeatFlagAttachmentPlugin.
Code
public function renderButtons(HeartbeatActivity $heartbeatActivity) {
if (isset($this->link)) {
$heartbeatActivity
->add_button($this->link);
}
elseif ($this->flag && $this->flag
->access($heartbeatActivity->uaid)) {
$link = $this->flag
->theme($this->flag
->is_flagged($heartbeatActivity->uaid) ? 'unflag' : 'flag', $heartbeatActivity->uaid, FALSE);
$heartbeatActivity
->add_button($link);
}
}