You are here

protected function EntityReferenceHandlerBase::allowPushingReferencedEntities in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x src/Plugin/EntityReferenceHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityReferenceHandlerBase::allowPushingReferencedEntities()
  2. 2.0.x src/Plugin/EntityReferenceHandlerBase.php \Drupal\cms_content_sync\Plugin\EntityReferenceHandlerBase::allowPushingReferencedEntities()

Return value

bool

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

1 method overrides EntityReferenceHandlerBase::allowPushingReferencedEntities()
DefaultWebformHandler::allowPushingReferencedEntities in src/Plugin/cms_content_sync/field_handler/DefaultWebformHandler.php

File

src/Plugin/EntityReferenceHandlerBase.php, line 341

Class

EntityReferenceHandlerBase
Providing a base implementation for any reference field type.

Namespace

Drupal\cms_content_sync\Plugin

Code

protected function allowPushingReferencedEntities() {
  $referenced_entity_types = \Drupal::entityTypeManager()
    ->getStorage($this
    ->getReferencedEntityTypes());
  foreach ($referenced_entity_types as $referenced_entity_type) {
    if ($referenced_entity_type instanceof ConfigEntityStorage) {
      return false;
    }
  }
  return true;
}