You are here

public function RecipientGatewayEvent::addGateway in SMS Framework 8

Same name and namespace in other branches
  1. 2.x src/Event/RecipientGatewayEvent.php \Drupal\sms\Event\RecipientGatewayEvent::addGateway()
  2. 2.1.x src/Event/RecipientGatewayEvent.php \Drupal\sms\Event\RecipientGatewayEvent::addGateway()

Add a gateway for the recipient on this event.

Parameters

\Drupal\sms\Entity\SmsGatewayInterface $gateway: The gateway for the recipient.

int $priority: The priority for this gateway.

Return value

$this Return this event for chaining.

File

src/Event/RecipientGatewayEvent.php, line 112

Class

RecipientGatewayEvent
Event fired to determine valid gateways for a recipient.

Namespace

Drupal\sms\Event

Code

public function addGateway(SmsGatewayInterface $gateway, $priority = 0) {
  $this->gateways[] = [
    $gateway,
    $priority,
  ];
  return $this;
}