function icon_select_vocabulary_form_submit in Icon Select 8
Custom submit handler for updating / saving icon vocabulary.
1 string reference to 'icon_select_vocabulary_form_submit'
File
- ./
icon_select.module, line 92 - Basic module file for icon_select module.
Code
function icon_select_vocabulary_form_submit(&$form, FormStateInterface $form_state) {
$config = \Drupal::service('config.factory')
->getEditable('icon_select.settings');
$path = $form_state
->getValue('path');
// Set and save new path value.
$config
->set('path', $path)
->save();
// Update sprites.
SvgSpriteGenerator::generateSprites('icons');
}