public function MobileNumberUtil::getCountryCode in Mobile Number 8
Same name and namespace in other branches
- 2.0.x src/MobileNumberUtil.php \Drupal\mobile_number\MobileNumberUtil::getCountryCode()
Gets the country phone number prefix given a country code.
Parameters
string $country: Country code (Eg. IL).
Return value
int Country phone number prefix (Eg. 972).
Overrides MobileNumberUtilInterface::getCountryCode
File
- src/
MobileNumberUtil.php, line 188
Class
- MobileNumberUtil
- Turns a render array into a HTML string.
Namespace
Drupal\mobile_numberCode
public function getCountryCode($country) {
return $this->libUtil
->getCountryCodeForRegion($country);
}