function apigee_edge_field_ui_field_storage_add_form_submit in Apigee Edge 8
Custom submit handler for field_ui_field_storage_add_form.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
1 string reference to 'apigee_edge_field_ui_field_storage_add_form_submit'
- apigee_edge_form_field_ui_field_storage_add_form_alter in ./
apigee_edge.module - Implements hook_form_field_ui_field_storage_add_form_alter().
File
- ./
apigee_edge.module, line 1525 - Copyright 2018 Google Inc.
Code
function apigee_edge_field_ui_field_storage_add_form_submit(array &$form, FormStateInterface &$form_state) {
if ($form_state
->getValue('apigee_edge_sync')) {
$user_fields_to_sync = \Drupal::configFactory()
->get('apigee_edge.sync')
->get('user_fields_to_sync');
$user_fields_to_sync[] = $form_state
->getValue('field_name');
\Drupal::configFactory()
->getEditable('apigee_edge.sync')
->set('user_fields_to_sync', $user_fields_to_sync)
->save();
}
}