You are here

function _domain_locale_get_language_domains in Domain Locale 7

Same name and namespace in other branches
  1. 6 domain_locale.module \_domain_locale_get_language_domains()

Helper function to retrieve domains that have a specific language enabled

Parameters

string $langcode:

Return value

array List of domain ids

1 call to _domain_locale_get_language_domains()
domain_locale_languages_delete_submit in ./domain_locale.module
Additional submit handler for locale_languages_overview_form().

File

./domain_locale.module, line 19
Provides domain specific language settings.

Code

function _domain_locale_get_language_domains($langcode) {
  $args[] = $langcode;
  $sql = <<<SQL
    SELECT domain_id
    FROM {domain_locale}
    WHERE language = :langcode
    ORDER BY domain_id
SQL;
  $result = db_query($sql, array(
    ':langcode' => $langcode,
  ));
  $domains = array();
  foreach ($result as $row) {
    $domains[] = $row->domain_id;
  }
  return $domains;
}