You are here

class ReceiveEvent in Webhooks 8

Class Receive Event.

@package Drupal\webhooks\Event

Hierarchy

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

Expanded class hierarchy of ReceiveEvent

4 files declare their use of ReceiveEvent
WebhookDispatcher.php in src/Plugin/QueueWorker/WebhookDispatcher.php
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/ReceiveEvent.php, line 14

Namespace

Drupal\webhooks\Event
View source
class ReceiveEvent 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 webhook.
   *
   * @return \Drupal\webhooks\Webhook
   *   The 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
ReceiveEvent::$webhook protected property The webhook.
ReceiveEvent::$webhookConfig protected property The webhook configuration.
ReceiveEvent::getWebhook public function Get the webhook.
ReceiveEvent::getWebhookConfig public function Get the webhook configuration.
ReceiveEvent::__construct public function SendEvent constructor.