You are here

countries_import.module in Countries 8

File

modules/countries_import/countries_import.module
View source
<?php

/**
 * Implements hook_menu().
 */
function countries_import_menu() {
  $items['admin/config/regional/countries/import'] = array(
    'title' => 'Bulk import',
    'description' => 'Bulk import countries from known providers.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'countries_import_bulk_import_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'countries_import.admin.inc',
  );
  return $items;
}

/**
 * Implements hook_theme().
 */
function countries_import_theme() {
  return array(
    'countries_import_bulk_import_selection_form' => array(
      'render element' => 'element',
    ),
  );
}

/**
 * Utility: Find plugins implementing hook_countries_import().
 */
function countries_import_plugins($plugin = NULL) {
  static $countries_import_plugins = NULL;
  if (!isset($countries_import_plugins)) {
    $countries_import_plugins = module_invoke_all('countries_import');
  }
  if ($plugin) {
    return $countries_import_plugins[$plugin];
  }
  return $countries_import_plugins;
}
function countries_import_countries_import() {
  return array(
    'countries_import_core' => array(
      'title' => t('Core ISO list'),
      'description' => t("Complete local list in sync with the ISO 3166-1 standards."),
    ),
    'countries_import_cldr' => array(
      'title' => t('CLDR Repository'),
      'description' => t("The Unicode Consortium CLDR is one of the largest and most extensive standard repositories of locale data that includes basic country information."),
    ),
  );
}

Functions

Namesort descending Description
countries_import_countries_import
countries_import_menu Implements hook_menu().
countries_import_plugins Utility: Find plugins implementing hook_countries_import().
countries_import_theme Implements hook_theme().