Builds a label for the library item.
\Drupal\paragraphs\ParagraphInterface $paragraph: The paragraph for which the label should be generated.
string
protected static function buildLabel(ParagraphInterface $paragraph) {
$summary = $paragraph
->getSummaryItems([
'show_behavior_summary' => FALSE,
]);
$summary = Unicode::truncate(implode(', ', $summary['content']), 50);
return $paragraph
->getParagraphType()
->label() . ': ' . $summary;
}