You are here

protected function AliasStorage::isMultiversionableEntityType in Multiversion 8

Parameters

string $entity_type_id:

Return value

bool

1 call to AliasStorage::isMultiversionableEntityType()
AliasStorage::save in src/AliasStorage.php
Saves a path alias to the database.

File

src/AliasStorage.php, line 334

Class

AliasStorage
Extends the core AliasStore class. We need this to make possible aliases to work with Multiversion and Replication.

Namespace

Drupal\multiversion

Code

protected function isMultiversionableEntityType($entity_type_id) {
  try {
    $storage = $this->entityTypeManager
      ->getStorage($entity_type_id);
  } catch (InvalidPluginDefinitionException $exception) {
    return FALSE;
  }
  $entity_type = $storage
    ->getEntityType();
  $enabled = $this->state
    ->get('multiversion.migration_done.' . $entity_type_id, FALSE);
  if (is_subclass_of($entity_type
    ->getStorageClass(), ContentEntityStorageInterface::class) && $enabled) {
    return TRUE;
  }
  return FALSE;
}