You are here

public function PhoneNumberVerificationInterface::newPhoneVerification in SMS Framework 8

Same name and namespace in other branches
  1. 2.x src/Provider/PhoneNumberVerificationInterface.php \Drupal\sms\Provider\PhoneNumberVerificationInterface::newPhoneVerification()
  2. 2.1.x src/Provider/PhoneNumberVerificationInterface.php \Drupal\sms\Provider\PhoneNumberVerificationInterface::newPhoneVerification()

Generates a phone number verification for an entity and phone number pair.

The phone number verification is immediately saved to storage, and an SMS is sent to the phone number for verification.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: An entity to get phone number verification.

string $phone_number: A phone number.

Return value

\Drupal\sms\Entity\PhoneNumberVerificationInterface|null A phone number verification.

1 method overrides PhoneNumberVerificationInterface::newPhoneVerification()
PhoneNumberVerification::newPhoneVerification in src/Provider/PhoneNumberVerification.php
Generates a phone number verification for an entity and phone number pair.

File

src/Provider/PhoneNumberVerificationInterface.php, line 99

Class

PhoneNumberVerificationInterface
Interface for phone number provider.

Namespace

Drupal\sms\Provider

Code

public function newPhoneVerification(EntityInterface $entity, $phone_number);