You are here

function quote_update_8201 in Quote 8.2

Update quote settings data.

File

./quote.install, line 11
Allows users to quote posts or comments.

Code

function quote_update_8201() {
  $config = \Drupal::configFactory()
    ->getEditable('quote.settings');
  $allow_types = $config
    ->get('quote_allow_types');
  $allow_types = !empty($allow_types) ? $allow_types : [];
  $config
    ->set('quote_allow_types', array_filter($allow_types));
  $config
    ->save();
}