1 field_test.entity.inc field_test_entity_info_translatable($entity_type = NULL, $translatable = NULL)

Helper function to enable entity translations.

File

core/modules/field/tests/field_test/field_test.entity.inc, line 142
Defines an entity type.

Code

function field_test_entity_info_translatable($entity_type = NULL, $translatable = NULL) {
  backdrop_static_reset('field_has_translation_handler');
  $stored_value = &backdrop_static(__FUNCTION__, array());
  if (isset($entity_type)) {
    $stored_value[$entity_type] = $translatable;
    entity_info_cache_clear();
  }
  return $stored_value;
}