You are here

function uc_attribute_uc_product_settings_form_submit in Ubercart 8.4

Submit handler for product attribute settings.

See also

uc_attribute_form_uc_product_settings_form_alter()

1 string reference to 'uc_attribute_uc_product_settings_form_submit'
uc_attribute_form_uc_product_settings_form_alter in uc_attribute/uc_attribute.module
Implements hook_form_FORM_ID_alter() for uc_product_settings_form().

File

uc_attribute/uc_attribute.module, line 107
Ubercart Attribute module.

Code

function uc_attribute_uc_product_settings_form_submit($form, FormStateInterface $form_state) {
  \Drupal::configFactory()
    ->getEditable('uc_attribute.settings')
    ->set('option_price_format', $form_state
    ->getValue('uc_attribute_option_price_format'))
    ->save();

  // Clear node entity cache, to force re-rendering of attribute forms.
  \Drupal::entityTypeManager()
    ->getViewBuilder('node')
    ->resetCache();
}