summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/field_test.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-16 02:04:44 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-16 02:04:44 +0000
commit6061fa9781205b4de2a5cc69a565036e5fb2bf97 (patch)
treefddd45aac58609796d174121e922a7acdaa9106c /modules/simpletest/tests/field_test.module
parent5faaa376aa8c0bb5b1a17bca8f506f8431f795b0 (diff)
downloadbrdo-6061fa9781205b4de2a5cc69a565036e5fb2bf97.tar.gz
brdo-6061fa9781205b4de2a5cc69a565036e5fb2bf97.tar.bz2
#565480 by plach and peximo: TF #2: Multilingual field handling. Integration between field API and locale module + translatable node bodies.
Diffstat (limited to 'modules/simpletest/tests/field_test.module')
-rw-r--r--modules/simpletest/tests/field_test.module9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/simpletest/tests/field_test.module b/modules/simpletest/tests/field_test.module
index d5c35d06b..8cc99b1e9 100644
--- a/modules/simpletest/tests/field_test.module
+++ b/modules/simpletest/tests/field_test.module
@@ -93,8 +93,13 @@ function field_test_entity_info() {
* Implement hook_entity_info_alter().
*/
function field_test_entity_info_alter(&$entity_info) {
+ // Enable/disable field_test as a translation handler.
foreach (field_test_entity_info_translatable() as $obj_type => $translatable) {
- $entity_info[$obj_type]['translation_handlers']['field_test'] = TRUE;
+ $entity_info[$obj_type]['translation']['field_test'] = $translatable;
+ }
+ // Disable locale as a translation handler.
+ foreach (field_info_fieldable_types() as $obj_type => $info) {
+ $entity_info[$obj_type]['translation']['locale'] = FALSE;
}
}
@@ -646,7 +651,7 @@ function field_test_field_languages($obj_type, $field, &$languages) {
*/
function field_test_entity_info_translatable($obj_type = NULL, $translatable = NULL) {
$stored_value = &drupal_static(__FUNCTION__, array());
- if (isset($obj_type) && isset($translatable)) {
+ if (isset($obj_type)) {
$stored_value[$obj_type] = $translatable;
_field_info_collate_types(TRUE);
}