You are here

function fillpdf_update_8104 in FillPDF 5.0.x

Same name and namespace in other branches
  1. 8.4 fillpdf.install \fillpdf_update_8104()

Add replacements fields.

File

./fillpdf.install, line 109
Install functions for FillPDF.

Code

function fillpdf_update_8104() {
  $edum = \Drupal::entityDefinitionUpdateManager();
  $replacements = BaseFieldDefinition::create('string_long')
    ->setLabel(t('Replace word(s) with correct output values'))
    ->setDescription(FillPdfAdminFormHelper::getReplacementsDescription());
  $edum
    ->installFieldStorageDefinition('replacements', 'fillpdf_form', 'fillpdf_form', $replacements);
}