You are here

function paragraphs_library_update_8002 in Paragraphs 8

Set library item's paragraph field required.

File

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

Code

function paragraphs_library_update_8002() {
  if ($field = FieldConfig::load('paragraph.from_library.field_reusable_paragraph')) {
    $field
      ->setRequired(TRUE)
      ->save();
  }
}