public function MobileNumberUtil::getCallableNumber in Mobile Number 2.0.x
Same name and namespace in other branches
- 8 src/MobileNumberUtil.php \Drupal\mobile_number\MobileNumberUtil::getCallableNumber()
Get international number.
Parameters
\libphonenumber\PhoneNumber $mobile_number: Phone number object.
Return value
string E.164 formatted number.
Overrides MobileNumberUtilInterface::getCallableNumber
5 calls to MobileNumberUtil::getCallableNumber()
- MobileNumberUtil::checkFlood in src/
MobileNumberUtil.php - Checks whether there were too many verifications attempted with the current number.
- MobileNumberUtil::codeHash in src/
MobileNumberUtil.php - Generate hash given token and code.
- MobileNumberUtil::registerVerificationCode in src/
MobileNumberUtil.php - Registers code for mobile number and returns it's token.
- MobileNumberUtil::sendVerification in src/
MobileNumberUtil.php - Send verification code to mobile number.
- MobileNumberUtil::verifyCode in src/
MobileNumberUtil.php - Verifies input code matches code sent to user.
File
- src/
MobileNumberUtil.php, line 158
Class
- MobileNumberUtil
- Turns a render array into a HTML string.
Namespace
Drupal\mobile_numberCode
public function getCallableNumber(PhoneNumber $mobile_number) {
return $mobile_number ? $this->libUtil
->format($mobile_number, PhoneNumberFormat::E164) : NULL;
}