public static function LingotekSync::setConfigMarkedValue in Lingotek Translation 7.7
Sets a Lingotek metadata value for this item.
Parameters
int $lid: The lid for the config item.
int $marked_offset: Integer space reserved for marked value
2 calls to LingotekSync::setConfigMarkedValue()
- lingotek_update_marked_items in ./
lingotek.bulk_grid.inc - Updates marked value in the lingotek_entity_metadata table
- lingotek_update_marked_item_single in ./
lingotek.bulk_grid.inc - Updates marked value in the lingotek_entity_metadata table for one row
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 1349 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function setConfigMarkedValue($lid, $marked_offset) {
$insertRecord = array(
"value" => $lid,
"created" => time(),
"modified" => time(),
"id" => $marked_offset,
"config_key" => 'marked',
);
$updateRecord = array(
"value" => $lid,
"modified" => time(),
);
db_merge('lingotek_config_metadata')
->key(array(
'id' => $marked_offset,
'config_key' => 'marked',
))
->insertFields($insertRecord)
->updateFields($updateRecord)
->execute();
}