Stores the entity property language-aware data.
\Drupal\Core\Entity\EntityInterface $entity: The entity object.
protected function savePropertyData(EntityInterface $entity) {
// Delete and insert to handle removed values.
$this->database
->delete($this->dataTable)
->condition($this->idKey, $entity
->id())
->execute();
$query = $this->database
->insert($this->dataTable);
foreach ($entity
->getTranslationLanguages() as $langcode => $language) {
$record = $this
->mapToDataStorageRecord($entity, $langcode);
$values = (array) $record;
$query
->fields(array_keys($values))
->values($values);
}
$query
->execute();
}