protected static function LingotekConfigSet::hasMaxChars in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.6 lib/Drupal/lingotek/LingotekConfigSet.php \LingotekConfigSet::hasMaxChars()
1 call to LingotekConfigSet::hasMaxChars()
- LingotekConfigSet::getOpenSet in lib/
Drupal/ lingotek/ LingotekConfigSet.php
File
- lib/
Drupal/ lingotek/ LingotekConfigSet.php, line 287 - Defines LingotekConfigSet.
Class
- LingotekConfigSet
- A class wrapper for Lingotek-specific behavior on ConfigSets.
Code
protected static function hasMaxChars($set_id) {
$lids = self::getLidsFromSets($set_id);
if (!empty($lids)) {
$query = db_select('locales_source', 'ls')
->fields('ls', array(
'source',
))
->condition('lid', $lids, 'IN')
->execute();
$strings_array = $query
->fetchCol();
$strings = implode('', $strings_array);
if (strlen($strings) > LINGOTEK_CONFIG_MAX_SOURCE_LENGTH) {
return TRUE;
}
}
return FALSE;
}