You are here

function countries_admin_page in Countries 7

Same name and namespace in other branches
  1. 8 countries.admin.inc \countries_admin_page()
  2. 7.2 countries.admin.inc \countries_admin_page()

Menu callback; Display a country form.

1 string reference to 'countries_admin_page'
countries_menu in ./countries.module
Implement hook_menu().

File

./countries.admin.inc, line 92
Admin page callbacks for the Countries module.

Code

function countries_admin_page($country = NULL) {
  if (!isset($country->name)) {
    drupal_set_title(t('Add country'), PASS_THROUGH);
    $country = (object) array(
      'cid' => 0,
      'iso2' => '',
      'iso3' => '',
      'name' => '',
      'official_name' => '',
      'continent' => 'UN',
      'enabled' => 1,
      'numcode' => 0,
    );
  }
  return drupal_get_form('countries_admin_form', $country);
}