You are here

class MessageNotifierSlack in Slack 7

@file Slack notifier.

Hierarchy

Expanded class hierarchy of MessageNotifierSlack

1 string reference to 'MessageNotifierSlack'
slack.inc in plugins/notifier/slack/slack.inc

File

plugins/notifier/slack/MessageNotifierSlack.class.php, line 8
Slack notifier.

View source
class MessageNotifierSlack extends MessageNotifierBase {
  public function deliver(array $output = array()) {
    if (!($webhook_url = slack_get_default_webhook_url())) {
      drupal_set_message('Message cannot be sent if Webhook URL is not configured in Slack module settings.', 'error');
    }
    return slack_send_message($webhook_url, strip_tags($output['message_notify_slack_body']));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MessageNotifierBase::$message protected property The message entity.
MessageNotifierBase::$plugin protected property The plugin definition.
MessageNotifierBase::access public function Determine if user can access notifier. Overrides MessageNotifierInterface::access
MessageNotifierBase::postSend public function Act upon send result. Overrides MessageNotifierInterface::postSend
MessageNotifierBase::send public function Entry point to send and process a message. Overrides MessageNotifierInterface::send
MessageNotifierBase::__construct public function Constructor for the notifier. Overrides MessageNotifierInterface::__construct
MessageNotifierSlack::deliver public function Deliver a message via the required transport method. Overrides MessageNotifierBase::deliver