public function TMGMTTranslator::__destruct in Translation Management Tool 7
Updates the language cache if it has changed.
File
- entity/
tmgmt.entity.translator.inc, line 289
Class
- TMGMTTranslator
- Entity class for the tmgmt_translator entity.
Code
public function __destruct() {
if ($controller = $this
->getController()) {
$info = $controller
->pluginInfo();
if (!isset($info['language cache']) || !empty($info['language cache']) && !empty($this->languageCacheOutdated)) {
cache_set('languages:' . $this->name, $this->languageCache, 'cache_tmgmt');
cache_set('language_pairs:' . $this->name, $this->languagePairsCache, 'cache_tmgmt');
}
}
}