protected function InlineParagraphsWidget::isContentReferenced

Checks whether a content entity is referenced.

Return value

bool

File

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

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');
}