public function LingotekInterfaceTranslationService::updateEntityHash in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::updateEntityHash()
- 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::updateEntityHash()
- 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::updateEntityHash()
- 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::updateEntityHash()
- 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::updateEntityHash()
- 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::updateEntityHash()
- 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::updateEntityHash()
Updates the component hash.
Parameters
string $component: The component being checked.
Overrides LingotekInterfaceTranslationServiceInterface::updateEntityHash
File
- src/
LingotekInterfaceTranslationService.php, line 463
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
public function updateEntityHash($component) {
$source_data = json_encode($this
->getSourceData($component));
$metadata = $this
->getMetadata($component);
if (!empty($metadata)) {
$metadata['lingotek_hash'] = md5($source_data);
$this
->saveMetadata($component, $metadata);
}
}