function field_test_entity_info_translatable

Helper function to enable entity translations.

10 calls to field_test_entity_info_translatable()

File

drupal/modules/field/tests/field_test.entity.inc, line 146
Defines an entity type.

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;
}