function tmgmt_i18n_string_i18n_object_info_alter in Translation Management Tool 7
Implements hook_i18n_object_info_alter().
File
- sources/
i18n_string/ tmgmt_i18n_string.module, line 212 - Source plugin for the Translation Management system that handles i18n strings.
Code
function tmgmt_i18n_string_i18n_object_info_alter(&$info) {
$entity_info = entity_get_info();
// Add a entity key to the object info if neither load callback nor entity
// keys are set and the object is an entity_type.
// @todo: Add this as default in EntityDefaultI18nStringController.
foreach ($info as $name => &$object) {
if (!isset($object['load callback']) && !isset($object['entity']) && isset($entity_info[$name])) {
$object['entity'] = $name;
}
}
}