You are here

protected function InlineParagraphsWidget::isContentReferenced in Paragraphs 8

Checks whether a content entity is referenced.

Return value

bool

File

src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php, line 1245

Class

InlineParagraphsWidget
Plugin implementation of the 'entity_reference paragraphs' widget.

Namespace

Drupal\paragraphs\Plugin\Field\FieldWidget

Code

protected function isContentReferenced() {
  $target_type = $this
    ->getFieldSetting('target_type');
  $target_type_info = \Drupal::entityTypeManager()
    ->getDefinition($target_type);
  return $target_type_info
    ->entityClassImplements('\\Drupal\\Core\\Entity\\ContentEntityInterface');
}