You are here

protected function LinkItemNormalizer::isMultiversionableEntityType in Replication 8

Parameters

string $entity_type_id:

Return value

bool

1 call to LinkItemNormalizer::isMultiversionableEntityType()
LinkItemNormalizer::normalize in src/Normalizer/LinkItemNormalizer.php
Normalizes an object into a set of arrays/scalars.

File

src/Normalizer/LinkItemNormalizer.php, line 185

Class

LinkItemNormalizer

Namespace

Drupal\replication\Normalizer

Code

protected function isMultiversionableEntityType($entity_type_id) {
  try {
    $storage = $this->entityTypeManager
      ->getStorage($entity_type_id);
  } catch (InvalidPluginDefinitionException $exception) {
    return FALSE;
  }
  $entity_type = $storage
    ->getEntityType();
  if (is_subclass_of($entity_type
    ->getStorageClass(), 'Drupal\\multiversion\\Entity\\Storage\\ContentEntityStorageInterface')) {
    return TRUE;
  }
  return FALSE;
}