You are here

function country_create in Countries 7.2

Same name and namespace in other branches
  1. 8 countries.module \country_create()

Creates a default country object.

Parameters

array $properties: An array of additional properties to add to the new object.

Return value

object A country strut by the additional properties and defaulted to the schema defined defaults.

11 calls to country_create()
CountriesBaseImportUnitTest::testCountriesCoreListingImport in tests/countries.test
Tests the import routines.
CountriesBaseInstallUnitTest::testCountriesAdminListing in tests/countries.test
This browes the admin listing, making sure that the countries are correctly listed.
CountriesBaseSetupTest::assertCountryListed in tests/countries.test
CountriesCacheUnitTest::testCache in tests/countries.test
CountriesCRUDUIUnitTest::testCountriesAddition in tests/countries.test
This test that the country property lookup is working.

... See full list

File

./countries.module, line 263
Defines the field and entity information for countries.

Code

function country_create($properties = array()) {
  return entity_create('country', $properties + array(
    'cid' => NULL,
    'iso2' => '',
    'iso3' => '',
    'name' => '',
    'official_name' => '',
    'continent' => 'UN',
    'enabled' => 1,
    'numcode' => 0,
  ));
}