function field_test_entity_info_translatable
Same name in other branches
- 9 core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_info_translatable()
- 8.9.x core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_info_translatable()
- 10 core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_info_translatable()
- 11.x core/modules/field/tests/modules/field_test/field_test.entity.inc \field_test_entity_info_translatable()
Helper function to enable entity translations.
10 calls to field_test_entity_info_translatable()
- EntityFieldQueryTestCase::testEntityFieldQueryMetaConditions in modules/
simpletest/ tests/ entity_query.test - Tests field meta conditions.
- EntityFieldQueryTestCase::testEntityFieldQueryTranslatable in modules/
simpletest/ tests/ entity_query.test - Tests querying translatable fields.
- FieldSqlStorageTestCase::testFieldSqlStorageMultipleConditionsDifferentColumnsMultipleLanguages in modules/
field/ modules/ field_sql_storage/ field_sql_storage.test - Test handling multiple conditions on multiple columns of one field for multiple languages.
- FieldTranslationsTestCase::testFieldAvailableLanguages in modules/
field/ tests/ field.test - Ensures that only valid values are returned by field_available_languages().
- FieldTranslationsTestCase::testFieldDisplayLanguage in modules/
field/ tests/ field.test - Tests display language logic for translatable fields.
File
-
modules/
field/ tests/ field_test.entity.inc, line 146
Code
function field_test_entity_info_translatable($entity_type = NULL, $translatable = NULL) {
drupal_static_reset('field_has_translation_handler');
$stored_value =& drupal_static(__FUNCTION__, array());
if (isset($entity_type)) {
$stored_value[$entity_type] = $translatable;
entity_info_cache_clear();
}
return $stored_value;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.