You are here

function services_client_migrate_get_empty_info_config in Services Client 7.2

Retrieve mapping configuration for given field from old settings.

Parameters

string $field: Destination field name.

array $empty: Legacy empty mapping.

Return value

array Legacy configuration if found in format array(0 => 'legacy_field', 1 => 'legacy_value')

1 call to services_client_migrate_get_empty_info_config()
services_client_migrate_get_empty_info in ./services_client.legacy.inc
Retrieve info about legacy empty mapping configuration.

File

./services_client.legacy.inc, line 379
Contains functions required for automated converting old Services Client version 1 hooks to events. This file is included only in drush command 'services-client-migrate-hooks'.

Code

function services_client_migrate_get_empty_info_config($field, $empty) {
  foreach ($empty as $key => $value) {
    if (strpos($key, $field) === 0) {
      return array(
        $key,
        $value,
      );
    }
  }
}