Install
Works with Drupal: 7.xUsing Composer to manage Drupal site dependencies
Downloads
Release notes
Address Field Lookup 2.0
The time has come for a the second major release of Address Field Lookup. This release is the culmination of code reviews and real world usage of the module over the past 6 months. This release greatly simplifies the integration process for developers of lookup services; the interface is much simpler with only 2 functions defined. The release also makes the module codebase much more maintainable and easier to manage.
These changes make this release incompatible with 1.x era integrations. API breaking changes can be found in API.txt in the module folder; but can also be found below.
- Refactored
setLookupTerm()
,lookup()
andgetLookupResult()
functions into a single function -lookup($term)
. This function now accepts the search term as a required parameter and returns either the array of search results or FALSE if no results could be found. - All integrating modules must define a 'object factory' key in their implementation of
hook_addressfield_lookup_service_info
. This key refers to a function responsible for instantiating the PHP class that implements theAddressFieldLookupInterface
interface. The function receives the service info array as a parameter. hook_addressfield_lookup_get_service_object
no longer exists. Any module functions implementing this hook will not be invoked. See the 'object factory' details in the above bullet point and the example module which can be found in tests/modules/addressfield_lookup_example.- The functions
addressfield_lookup_get_addresses()
andaddressfield_lookup_get_address_details()
no longer accept a$show_errors
parameter. The 2nd parameter on both functions is now the cache reset parameter. See addressfield_lookup.module for more details.