You are here

function mobile_number_views_country_options in Mobile Number 8

Same name and namespace in other branches
  1. 7 mobile_number.module \mobile_number_views_country_options()
  2. 2.0.x mobile_number.module \mobile_number_views_country_options()

Helper function for get all supported countries for views.

File

./mobile_number.module, line 57
mobile_number.module

Code

function mobile_number_views_country_options($allowed_countries = []) {

  /** @var \Drupal\mobile_number\MobileNumberUtilInterface $util */
  $util = \Drupal::service('mobile_number.util');
  return $util
    ->getCountryOptions($allowed_countries, TRUE);
}