protected function ParagraphsWidget::getDefaultParagraphTypeLabelName

Returns the default paragraph type.

Return value

string Label name for default paragraph type.

1 call to ParagraphsWidget::getDefaultParagraphTypeLabelName()
ParagraphsWidget::settingsSummary in paragraphs/src/Plugin/Field/FieldWidget/ParagraphsWidget.php

File

paragraphs/src/Plugin/Field/FieldWidget/ParagraphsWidget.php, line 2786

Class

ParagraphsWidget
Plugin implementation of the 'entity_reference_revisions paragraphs' widget.

Namespace

Drupal\paragraphs\Plugin\Field\FieldWidget

Code

protected function getDefaultParagraphTypeLabelName() {
  if ($this
    ->getDefaultParagraphTypeMachineName() !== NULL) {
    $allowed_types = $this
      ->getAllowedTypes();
    return $allowed_types[$this
      ->getDefaultParagraphTypeMachineName()]['label'];
  }
  return NULL;
}