You are here

public function MigrateAddressFieldHandler::fields in Address Field 7

Provide subfields for the addressfield columns.

File

./addressfield.migrate.inc, line 61
Base integration with the Migrate API class.

Class

MigrateAddressFieldHandler
Primary value passed to this field must be the two letter ISO country code of the address.

Code

public function fields() {

  // Declare our arguments to also be available as subfields.
  $fields = array(
    'administrative_area' => t('<a href="@doc">The administrative area of ' . 'this address (i.e. State/Province)</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#administrative_area',
    )),
    'sub_administrative_area' => t('<a href="@doc">The sub administrative ' . 'area of this address</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#sub_administrative_area',
    )),
    'locality' => t('<a href="@doc">The locality of this address (i.e. ' . 'City)</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#locality',
    )),
    'dependent_locality' => t('<a href="@doc">The dependent locality of ' . 'this address</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#dependent_locality',
    )),
    'postal_code' => t('<a href="@doc">The postal code of this address</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#postal_code',
    )),
    'thoroughfare' => t('<a href="@doc">The thoroughfare of this address ' . '(i.e. Street address)</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#thoroughfare',
    )),
    'premise' => t('<a href="@doc">The premise of this address (i.e. Apartment / Suite number)</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#premise',
    )),
    'sub_premise' => t('<a href="@doc">The sub_premise of this address</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#sub_premise',
    )),
    'organisation_name' => t('<a href="@doc">Contents of a primary ' . 'OrganisationName element in the xNL XML</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#organisation_name',
    )),
    'name_line' => t('<a href="@doc">Contents of a primary NameLine element ' . 'in the xNL XML</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#name_line',
    )),
    'first_name' => t('<a href="@doc">Contents of the FirstName element of ' . 'a primary PersonName element in the xNL XML</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#first_name',
    )),
    'last_name' => t('<a href="@doc">Contents of the LastName element of a ' . 'primary PersonName element in the xNL XML</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#last_name',
    )),
    'data' => t('<a href="@doc">Additional data for this address</a>', array(
      '@doc' => 'http://drupal.org/node/1996546#data',
    )),
  );
  return $fields;
}