public function childelementtypesAction(Request $request)
    {
        $eid = $request->get('eid');

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

        $element = $elementService->findElement($eid);
        $elementtype = $elementService->findElementtype($element);
        $childElementtypes = $elementService->findAllowedChildren($elementtype);

        $data = [];
        foreach ($childElementtypes as $childElementtype) {
            if (!in_array($childElementtype->getType(), [Elementtype::TYPE_FULL, Elementtype::TYPE_STRUCTURE])) {
                continue;
            }

            $data[$childElementtype->getTitle().'_'.$childElementtype->getId()] = [
                'id' => $childElementtype->getId(),
                'title' => $childElementtype->getTitle(),
                'icon' => $iconResolver->resolveElementtype($childElementtype),
                'type' => $childElementtype->getType(),
            ];
        }
        ksort($data);
        $data = array_values($data);

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