You are here

class SendEvent in Webhooks 8

Class Send Event.

@package Drupal\webhooks\Event

Hierarchy

  • class \Drupal\webhooks\Event\SendEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of SendEvent

3 files declare their use of SendEvent
WebhooksService.php in src/WebhooksService.php
WebhooksTestSubscriber.php in tests/modules/webhooks_test/src/EventSubscriber/WebhooksTestSubscriber.php
WebhookSubscriber.php in modules/webhook/src/EventSubscriber/WebhookSubscriber.php

File

src/Event/SendEvent.php, line 14

Namespace

Drupal\webhooks\Event
View source
class SendEvent extends Event {

  /**
   * The webhook.
   *
   * @var \Drupal\webhooks\Webhook
   */
  protected $webhook;

  /**
   * The webhook configuration.
   *
   * @var \Drupal\webhooks\Entity\WebhookConfig
   */
  protected $webhookConfig;

  /**
   * SendEvent constructor.
   *
   * @param \Drupal\webhooks\Entity\WebhookConfig $webhook_config
   *   A webhook configuration entity.
   * @param \Drupal\webhooks\Webhook $webhook
   *   A webhook.
   */
  public function __construct(WebhookConfig $webhook_config, Webhook $webhook) {
    $this->webhookConfig = $webhook_config;
    $this->webhook = $webhook;
  }

  /**
   * Get the webhooks.
   *
   * @return \Drupal\webhooks\Webhook
   *   A webhook.
   */
  public function getWebhook() {
    return $this->webhook;
  }

  /**
   * Get the webhook configuration.
   *
   * @return \Drupal\webhooks\Entity\WebhookConfig
   *   A webhook configuration.
   */
  public function getWebhookConfig() {
    return $this->webhookConfig;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SendEvent::$webhook protected property The webhook.
SendEvent::$webhookConfig protected property The webhook configuration.
SendEvent::getWebhook public function Get the webhooks.
SendEvent::getWebhookConfig public function Get the webhook configuration.
SendEvent::__construct public function SendEvent constructor.