function globallink_update_gl_field_config in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 globallink_field_configuration.inc \globallink_update_gl_field_config()
- 7.6 globallink_field_configuration.inc \globallink_update_gl_field_config()
Updates GlobalLink field configuration.
Parameters
string $type: The content type.
array $fids: The array of field IDs.
1 call to globallink_update_gl_field_config()
- globallink_field_submit in ./
globallink_field_configuration.inc - Handles submission of globallink_field form.
File
- ./
globallink_field_configuration.inc, line 441 - Globallink_field_configuration.inc is a file that contains most functions needed on the Field Configuration UI.
Code
function globallink_update_gl_field_config($type, $fids) {
// First update everything to 0 for this type.
db_update('globallink_field_config')
->fields(array(
'translatable' => 0,
))
->condition('content_type', $type, '=')
->condition('field_type', 'field_collection', '!=')
->execute();
foreach ($fids as $fid) {
db_update('globallink_field_config')
->fields(array(
'translatable' => 1,
))
->condition('fid', $fid, '=')
->execute();
}
}