protected function getCategoryUrl()
    {
        $rootKey = $this->container->getParameter('sulu_product.category_root_key');

        if (null !== $rootKey) {
            return $this->generateUrl(
                'get_category_children',
                ['key' => $rootKey, 'flat' => 'true', 'sortBy' => 'depth', 'sortOrder' => 'asc']
            );
        }

        return $this->generateUrl(
            'get_categories',
            ['flat' => 'true', 'sortBy' => 'depth', 'sortOrder' => 'asc']
        );
    }