protected function EncryptionProfileForm::createPluginFormState in Encrypt 8.3
Creates a FormStateInterface object for a plugin.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state to copy values from.
Return value
\Drupal\Core\Form\FormStateInterface A clone of the form state object with values from the plugin.
3 calls to EncryptionProfileForm::createPluginFormState()
- EncryptionProfileForm::form in src/
Form/ EncryptionProfileForm.php - Gets the actual form array to be built.
- EncryptionProfileForm::submitForm in src/
Form/ EncryptionProfileForm.php - This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
- EncryptionProfileForm::validateForm in src/
Form/ EncryptionProfileForm.php - Form validation handler.
File
- src/
Form/ EncryptionProfileForm.php, line 236
Class
- EncryptionProfileForm
- Provides the form to add / edit an EncryptionProfile entity.
Namespace
Drupal\encrypt\FormCode
protected function createPluginFormState(FormStateInterface $form_state) {
// Clone the form state.
$plugin_form_state = clone $form_state;
// Clear the values, except for this plugin type's settings.
$plugin_form_state
->setValues($form_state
->getValue('encryption_method_configuration', []));
return $plugin_form_state;
}