You are here

public function MobileNumberUtil::sendSms in Mobile Number 8

Same name and namespace in other branches
  1. 2.0.x src/MobileNumberUtil.php \Drupal\mobile_number\MobileNumberUtil::sendSms()

Sends an sms, based on callback provided by smsCallback().

Parameters

string $number: A callable number in international format.

string $message: String message, after translation.

Return value

bool SMS callback result, TRUE = success, FALSE otherwise.

Overrides MobileNumberUtilInterface::sendSms

1 call to MobileNumberUtil::sendSms()
MobileNumberUtil::sendVerification in src/MobileNumberUtil.php
Send verification code to mobile number.

File

src/MobileNumberUtil.php, line 366

Class

MobileNumberUtil
Turns a render array into a HTML string.

Namespace

Drupal\mobile_number

Code

public function sendSms($number, $message) {
  $callback = $this
    ->smsCallback();
  if (!$callback) {
    return FALSE;
  }
  return call_user_func($callback, $number, $message);
}