Checks whether a content entity is referenced.
bool
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');
}