function paragraphs_library_form_paragraphs_type_form_builder

Entity builder for the paragraphs type form with group property.

See also

paragraphs_library_form_paragraphs_type_form_alter()

1 string reference to 'paragraphs_library_form_paragraphs_type_form_builder'

File

paragraphs/modules/paragraphs_library/paragraphs_library.module, line 212
Main module file for the Paragraphs Library module.

Code

function paragraphs_library_form_paragraphs_type_form_builder($entity_type, ParagraphsTypeInterface $type, &$form, FormStateInterface $form_state) {
  if ($form_state
    ->getValue('allow_library_conversion')) {
    $type
      ->setThirdPartySetting('paragraphs_library', 'allow_library_conversion', $form_state
      ->getValue('allow_library_conversion'));
  }
  else {
    $type
      ->unsetThirdPartySetting('paragraphs_library', 'allow_library_conversion');
  }
}