You are here

function i18n_sync_options in Internationalization 7

Returns list of available fields for given entity / bundle.

Fields can also be changed using hook_i18n_sync_options_alter($fields, $type)

Parameters

$entity_type: Entity type.

:

1 call to i18n_sync_options()
i18n_sync_node_options in i18n_sync/i18n_sync.module
Returns list of available fields for given content type.

File

i18n_sync/i18n_sync.module, line 259
Internationalization (i18n) package. Synchronization of translations

Code

function i18n_sync_options($entity_type, $bundle_name) {
  $cache =& drupal_static(__FUNCTION__);
  if (!isset($cache[$entity_type][$bundle_name])) {
    module_load_include('modules.inc', 'i18n_sync');
    $fields = module_invoke_all('i18n_sync_options', $entity_type, $bundle_name);

    // Give a chance to modules to change/remove/add their own fields
    drupal_alter('i18n_sync_options', $fields, $entity_type, $bundle_name);
    $cache[$entity_type][$bundle_name] = $fields;
  }
  return $cache[$entity_type][$bundle_name];
}