You are here

function paragraphs_update_8020 in Paragraphs 8

Remove the base field overrides for uid & revision_uid.

File

./paragraphs.install, line 439
Installation hooks for Paragraphs module.

Code

function paragraphs_update_8020() {
  $config_factory = \Drupal::configFactory();
  $names = $config_factory
    ->listAll('core.base_field_override.paragraph.');
  foreach ($names as $name) {
    $config = $config_factory
      ->getEditable($name);
    if (in_array($config
      ->get('field_name'), [
      'uid',
      'revision_uid',
    ])) {
      $config
        ->delete();
    }
  }
}