You are here

function phone_field_property_get_callingcode in Phone 7.2

Callback for getting the calling code for a country.

1 string reference to 'phone_field_property_get_callingcode'
phone_field_property_info_callback in ./phone.module
Additional callback to adapt the property info of phone fields.

File

./phone.module, line 297
The phone module lets administrators use a phone number field type.

Code

function phone_field_property_get_callingcode($data, array $options, $name, $type, $info) {
  if (isset($data['countrycode'])) {
    return phone_countries($data['countrycode'], 'calling_code');
  }
  return NULL;
}