You are here

public function MultiversionManagerEvent::getEntityType in Multiversion 8

It helps the event subscriber to validate the entity_type_id value.

Parameters

string $entity_type_id:

Return value

\Drupal\Core\Entity\ContentEntityTypeInterface|NULL

File

src/Event/MultiversionManagerEvent.php, line 69

Class

MultiversionManagerEvent
MultiversionManagerEvent class.

Namespace

Drupal\multiversion\Event

Code

public function getEntityType($entity_type_id) {
  if (isset($this->entityTypes[$entity_type_id]) && $this->entityTypes[$entity_type_id] instanceof ContentEntityTypeInterface) {
    return $this->entityTypes[$entity_type_id];
  }
  return NULL;
}