protected function WrapperEntityForm::copyFormValuesToEntity in Backup and Migrate 5.0.x
Same name and namespace in other branches
- 8.4 src/Form/WrapperEntityForm.php \Drupal\backup_migrate\Form\WrapperEntityForm::copyFormValuesToEntity()
Override this function.
Let it store the config which would otherwise be removed for some reason.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity the current form should operate upon.
array $form: A nested array of form elements comprising the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides EntityForm::copyFormValuesToEntity
File
- src/
Form/ WrapperEntityForm.php, line 115
Class
- WrapperEntityForm
- @package Drupal\backup_migrate\Form
Namespace
Drupal\backup_migrate\FormCode
protected function copyFormValuesToEntity(EntityInterface $entity, array $form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
foreach ($values as $key => $value) {
$entity
->set($key, $value);
}
}