protected function lookupEntity(
        string $entity_class,
        int $entity_id,
        string $production_slug
    ): array {
        // Lookup the production by production_slug.
        $production_repo = $this->em->getRepository(Production::class);
        if (null === $production = $production_repo->findOneBy(['slug' => $production_slug])) {
            throw new NotFoundHttpException();
        }

        // Lookup the entity by id.
        $entity_repo = $this->em->getRepository($entity_class);
        if (null === $entity = $entity_repo->findOneBy(['id' => $entity_id])) {
            throw new NotFoundHttpException();
        }

        // Ensure entity is within production.
        if (!$entity->hasGroup($production)) {
            throw new NotFoundHttpException();
        }

        // Return the entity and the production.
        return [$entity, $production];
    }