function paragraphs_library_update_8103

Add the paragraphs_library module as dependency to the from_library paragraphs type.

File

paragraphs/modules/paragraphs_library/paragraphs_library.install, line 377
Install/Update hooks for paragraphs library.

Code

function paragraphs_library_update_8103() {
  $config = \Drupal::configFactory()
    ->getEditable('paragraphs.paragraphs_type.from_library');
  if ($config
    ->isNew()) {
    return;
  }
  $dependencies = $config
    ->get('dependencies') ?? [];
  $dependencies['enforced']['module'][] = 'paragraphs_library';
  $config
    ->set('dependencies', $dependencies);
  $config
    ->save();
}