function globallink_is_field_configured_for_translation in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 globallink.inc \globallink_is_field_configured_for_translation()
- 7.6 globallink.inc \globallink_is_field_configured_for_translation()
Determines whether or not a field is configured for translation.
Parameters
string $entity_type: The field's entity type.
string $bundle_name: The name of the bundle.
string $field_name: The field's name.
string $content_type: The field's content type.
Return value
True if the field is configured for translation.
13 calls to globallink_is_field_configured_for_translation()
- globallink_beans_get_xml in globallink_beans/
globallink_beans.inc - Gets XML data from specific bean.
- globallink_beans_traverse_fields_and_field_collections in globallink_beans/
globallink_beans.inc - Recursively adds fields and field collections to translation XML document.
- globallink_commerce_get_xml in globallink_commerce/
globallink_commerce.inc - Gets XML data from specific commerce product.
- globallink_commerce_traverse_fields_and_field_collections in globallink_commerce/
globallink_commerce.inc - globallink_custom_entity_add_fields_config in globallink_custom_entity/
globallink_custom_entity.inc
File
- ./
globallink.inc, line 888 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_is_field_configured_for_translation($entity_type, $bundle_name, $field_name, $content_type) {
$result = db_select('globallink_field_config', 'tf')
->fields('tf')
->condition('content_type', $content_type, '=')
->condition('entity_type', $entity_type, '=')
->condition('bundle', $bundle_name, '=')
->condition('field_name', $field_name, '=')
->execute();
foreach ($result as $row) {
if ($row->translatable == 1) {
return TRUE;
}
}
return FALSE;
}