public function resolveTreeNode(TreeNodeInterface $treeNode, $language)
    {
        $parameters = [];

        if (!$treeNode->isRoot()) {
            $tree = $treeNode->getTree();

            if ($tree->isPublished($treeNode, $language)) {
                $parameters['status'] = $tree->isAsync($treeNode, $language) ? 'async' : 'online';
            }

            if ($tree->isInstance($treeNode)) {
                $parameters['instance'] = $tree->isInstanceMaster($treeNode) ? 'master' : 'slave';
            }

            if ($treeNode->getSortMode() !== TreeInterface::SORT_MODE_FREE) {
                $parameters['sort'] = $treeNode->getSortMode().'_'.$treeNode->getSortDir();
            }
        }

        $element = $this->elementService->findElement($treeNode->getTypeId());

        if (!count($parameters)) {
            return $this->resolveElement($element);
        }

        $elementtype = $this->elementService->findElementtype($element);

        $parameters['icon'] = $elementtype->getIcon();

        return $this->router->generate('elements_icon', $parameters);
    }