You are here

public function PhoneNumberVerificationInterface::getPhoneVerificationByPhoneNumber in SMS Framework 2.x

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

Gets phone number verifications for a phone number.

This is the primary helper to determine if a phone number is in use.

It is possible for multiple entities to have the same phone number, so this helper may return more than one phone verification.

Parameters

string $phone_number: A phone number.

bool|null $verified: Whether the returned phone numbers must be verified, or NULL to get all regardless of status.

string $entity_type: An entity type ID to filter.

Return value

\Drupal\sms\Entity\PhoneNumberVerificationInterface[] An array of phone number verification entities, if any.

1 method overrides PhoneNumberVerificationInterface::getPhoneVerificationByPhoneNumber()
PhoneNumberVerification::getPhoneVerificationByPhoneNumber in src/Provider/PhoneNumberVerification.php
Gets phone number verifications for a phone number.

File

src/Provider/PhoneNumberVerificationInterface.php, line 72

Class

PhoneNumberVerificationInterface
Interface for phone number provider.

Namespace

Drupal\sms\Provider

Code

public function getPhoneVerificationByPhoneNumber($phone_number, $verified = TRUE, $entity_type = NULL);