function translation_entity_get_config_key

Returns the key name used to store the configuration item.

Based on the entity type and bundle, the variables used to store the configuration will have a common root name.

@todo Generalize this logic so that it is available to any module needing per-bundle configuration.

Parameters

string $entity_type: The type of the entity the setting refers to.

string $bundle: The bundle of the entity the setting refers to.

string $setting: The name of the setting.

Return value

string The key name of the configuration item.

2 calls to translation_entity_get_config_key()
translation_entity_get_config in drupal/core/modules/translation_entity/translation_entity.module
Retrieves the value for the specified setting.
translation_entity_set_config in drupal/core/modules/translation_entity/translation_entity.module
Stores the given value for the specified setting.

File

drupal/core/modules/translation_entity/translation_entity.module, line 274
Allows entities to be translated into different languages.

Code

function translation_entity_get_config_key($entity_type, $bundle, $setting) {
  $entity_type = preg_replace('/[^0-9a-zA-Z_]/', "_", $entity_type);
  $bundle = preg_replace('/[^0-9a-zA-Z_]/', "_", $bundle);
  return $entity_type . '.' . $bundle . '.translation_entity.' . $setting;
}