I am running a drupal 7 migration into Drupal 8 paragraphs. I am retrieving the source fid, mapping from the file migration, getting the dest file id, getting the source file description, and then creating a new file paragraph that just contains a public_file field.
Problem is that I can't find a way to set the description field of the file? I can create the paragraph with the file fine.
I have tried the following (where field_files is the name of the field in the paragraph)
$file->field_files['description'] = $file_title;
$paragraph->set('field_files', $file); $paragraph->set('field_files_descriptions', $file_title);
I have tried creating a test paragraph through the front end containing a description field and inspected the values, and there isn't anything obvious where I can set the value,
$testparagraph = $paragraph->getFields(); $testfile = $file->getFields();
The description value is only here in the paragraph entity
I'm at a bit of a loss where I can set this description.