public static function LingotekConfigSet::getSetId in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.6 lib/Drupal/lingotek/LingotekConfigSet.php \LingotekConfigSet::getSetId()
Return the set ID for a given segment from the locales source
Parameters
int: the lid of a segment from the locales source
Return value
int the ID of a set of configuration segments
3 calls to LingotekConfigSet::getSetId()
- LingotekSync::getDirtyConfigChunks in lib/
Drupal/ lingotek/ LingotekSync.php - lingotek_bulk_grid_parse_config_data in ./
lingotek.config.inc - lingotek_change_workflow in ./
lingotek.bulk_grid.inc - Callback function to change workflow for multiple nodes at a time
File
- lib/
Drupal/ lingotek/ LingotekConfigSet.php, line 182 - Defines LingotekConfigSet.
Class
- LingotekConfigSet
- A class wrapper for Lingotek-specific behavior on ConfigSets.
Code
public static function getSetId($lid, $assign = TRUE) {
// Check if the lid already has a set:
$existing_sid = db_select('lingotek_config_map', 'l')
->fields('l', array(
'set_id',
))
->condition('lid', $lid)
->execute()
->fetchField();
// If not, assign one to it
if (!$existing_sid && $assign) {
$new_sid = self::assignSetId($lid);
return $new_sid;
}
return $existing_sid;
}