You are here

function insert_colorbox_insert_config_submit_form in Insert 8.2

Implements hook_insert_config_submit_form().

File

modules/insert_colorbox/insert_colorbox.module, line 58

Code

function insert_colorbox_insert_config_submit_form(FormStateInterface $form_state) {

  /** @var \Drupal\Core\Config\Config $config */
  $config = \Drupal::getContainer()
    ->get('config.factory')
    ->getEditable('insert_colorbox.config');
  $config
    ->set('style', $form_state
    ->getValue('insert_colorbox__style'));
  $config
    ->set('gallery', $form_state
    ->getValue('insert_colorbox__gallery'));
  $config
    ->save();
}