src/Kunstmaan/NodeBundle/Router/SlugRouter.php
protected function getPreviewRouteParameters()
    {
        $previewPath = sprintf('/%s/preview/{url}', $this->adminKey);
        $previewDefaults = array(
            '_controller' => 'KunstmaanNodeBundle:Slug:slug',
            'preview' => true,
            'url' => '',
            '_locale' => $this->getDefaultLocale(),
        );
        $previewRequirements = array(
            'url' => $this->getSlugPattern(),
        );

        if ($this->isMultiLanguage()) {
            $previewPath = '/{_locale}' . $previewPath;
            unset($previewDefaults['_locale']);
            $previewRequirements['_locale'] = $this->getEscapedLocales($this->getBackendLocales());
        }

        return array(
            'path' => $previewPath,
            'defaults' => $previewDefaults,
            'requirements' => $previewRequirements,
        );
    }
protected function getPreviewRouteParameters()
    {
        $previewPath = sprintf('/%s/preview/{url}', $this->adminKey);
        $previewDefaults = array(
            '_controller' => 'KunstmaanNodeBundle:Slug:slug',
            'preview' => true,
            'url' => '',
            '_locale' => $this->getDefaultLocale(),
        );
        $previewRequirements = array(
            'url' => $this->getSlugPattern(),
        );

        if ($this->isMultiLanguage()) {
            $previewPath = '/{_locale}' . $previewPath;
            unset($previewDefaults['_locale']);
            $previewRequirements['_locale'] = $this->getEscapedLocales($this->getBackendLocales());
        }

        return array(
            'path' => $previewPath,
            'defaults' => $previewDefaults,
            'requirements' => $previewRequirements,
        );
    }
protected function getPreviewRouteParameters ( ) { $ previewPath = sprintf ( '/%s/preview/{url}' , $ this -> adminKey ) ; $ previewDefaults = array ( '_controller' => 'KunstmaanNodeBundle:Slug:slug' , 'preview' => true , 'url' => '' , '_locale' => $ this -> getDefaultLocale ( ) , ) ; $ previewRequirements = array ( 'url' => $ this -> getSlugPattern ( ) , ) ; if ( $ this -> isMultiLanguage ( ) ) { $ previewPath = '/{_locale}' . $ previewPath ; unset ( $ previewDefaults [ '_locale' ] ) ; $ previewRequirements [ '_locale' ] = $ this -> getEscapedLocales ( $ this -> getBackendLocales ( ) ) ; } return array ( 'path' => $ previewPath , 'defaults' => $ previewDefaults , 'requirements' => $ previewRequirements , ) ; }
Return preview route parameters

@return array
Return preview route parameters