class MessageNotifierSlack in Slack 7
@file Slack notifier.
Hierarchy
- class \MessageNotifierBase implements MessageNotifierInterface
- class \MessageNotifierSlack
Expanded class hierarchy of MessageNotifierSlack
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MessageNotifierBase:: |
protected | property | The message entity. | |
MessageNotifierBase:: |
protected | property | The plugin definition. | |
MessageNotifierBase:: |
public | function |
Determine if user can access notifier. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Act upon send result. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Entry point to send and process a message. Overrides MessageNotifierInterface:: |
|
MessageNotifierBase:: |
public | function |
Constructor for the notifier. Overrides MessageNotifierInterface:: |
|
MessageNotifierSlack:: |
public | function |
Deliver a message via the required transport method. Overrides MessageNotifierBase:: |