protected function InlineParagraphsWidget::getDefaultParagraphTypeLabelName

Returns the default paragraph type.

Return value

string $default_paragraph_type Label name for default paragraph type.

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

File

paragraphs/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php, line 1457

Class

InlineParagraphsWidget
Plugin implementation of the 'entity_reference 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;
}