Performs necessary operations just before fields data get saved.
We take no specific action here, we just give other modules the opportunity to act.
\Drupal\Core\Entity\EntityInterface $entity: The entity with fields to process.
function field_attach_presave($entity) {
// Ensure we are working with a BC mode entity.
$entity = $entity
->getBCEntity();
_field_invoke('presave', $entity);
// Let other modules act on presaving the entity.
module_invoke_all('field_attach_presave', $entity);
}