getEditable('system.mail'); $mail_plugins = $config->get('interface'); unset($mail_plugins['webform']); $config->set('interface', $mail_plugins)->save(); // Delete editor uploaded files. $config = \Drupal::configFactory()->get('webform.settings'); _webform_config_delete($config); } /** * Implements hook_schema(). * * Even though Webform's are config entities we need to create a 'webform' table * to track webform submission serial numbers using DB transaction locking. * * @see \Drupal\webform\WebformEntityStorage */ function webform_schema() { $schema['webform'] = [ 'description' => 'Stores all webform data.', 'fields' => [ 'webform_id' => [ 'description' => 'The webform id.', 'type' => 'varchar', 'length' => 32, 'not null' => TRUE, ], 'next_serial' => [ 'description' => 'The serial number to give to the next submission to this webform.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 1, ], ], 'primary key' => ['webform_id', 'next_serial'], ]; return $schema; }