public function childElementtypesAction(Request $request)
    {
        $id = $request->get('id');

        $elementSourceManager = $this->get('phlexible_element.element_source_manager');
        $elementService = $this->get('phlexible_element.element_service');
        $iconResolver = $this->get('phlexible_element.icon_resolver');

        $elementtype = $elementSourceManager->findElementtype($id);
        $childElementtypes = $elementService->findAllowedChildren($elementtype);

        $data = [];
        foreach ($childElementtypes as $childElementtype) {
            $data[$childElementtype->getTitle().$childElementtype->getId()] = [
                'id' => $childElementtype->getId(),
                'title' => $childElementtype->getTitle(),
                'icon' => $iconResolver->resolveElementtype($childElementtype),
            ];
        }
        ksort($data);
        $data = array_values($data);

        return new JsonResponse(['elementtypes' => $data]);
    }