public function getRoute(AdminInterface $admin, $action, $params = [], $isIndex = false)
    {
        $defaults = [];
        $path = '/' . $admin->getAlias();

        // append action if required
        if(!$isIndex) {
            $path .= '/' . $action;
        }

        foreach($params as $paramKey => $paramValue) {
            if(is_int($paramKey)) {
                $paramName = $paramValue;
            }
            else {
                $paramName = $paramKey;
                $defaults[$paramName] = $paramValue;
            }
            $path .= '/{' . $paramName . '}';
        }

        $controller = 'ShuweeAdminBundle:Content:' . $action;

        $defaults = array_merge(
          [
            '_controller' => $controller,
            'alias' => $admin->getAlias(),

          ],
          $defaults
        );

        return new Route($path, $defaults);
    }