diff --git a/modules/paragraphs_library/config/install/paragraphs.paragraphs_type.from_library.yml b/modules/paragraphs_library/config/install/paragraphs.paragraphs_type.from_library.yml index b889e4906fc585a4697ccde17f2f160d14935a87..3ddaa2cf0f7baf82af86c89b42e10d41ece3ea04 100644 --- a/modules/paragraphs_library/config/install/paragraphs.paragraphs_type.from_library.yml +++ b/modules/paragraphs_library/config/install/paragraphs.paragraphs_type.from_library.yml @@ -1,6 +1,9 @@ langcode: en status: true -dependencies: { } +dependencies: + enforced: + module: + - paragraphs_library id: from_library label: 'From library' behavior_plugins: { } diff --git a/modules/paragraphs_library/paragraphs_library.install b/modules/paragraphs_library/paragraphs_library.install index 1751ed9f35d929f316552d7edf02921112d06cd0..79e35630bfbf059b1094d2e5df2b7e30c12f13b9 100644 --- a/modules/paragraphs_library/paragraphs_library.install +++ b/modules/paragraphs_library/paragraphs_library.install @@ -370,3 +370,19 @@ function paragraphs_library_update_8102() { ->save(); } } + +/** + * Add the paragraphs_library module as dependency to the from_library paragraphs type. + */ +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(); +}