entities[$entityType])) { throw new InvalidArgumentException(sprintf('Unsupported entity type "%s".', $entityType)); } $entity = $this->entities[$entityType]; if (!$entity instanceof TranslatableEntityInterface) { throw new InvalidArgumentException(sprintf('Entity "%s" is misconfigured.', $entityType)); } return $entity; } }