PHP Class Networking\InitCmsBundle\Helper\LanguageSwitcherHelper

Author: Yorkie Chadwick ([email protected])
Show file Open project: networking/init-cms-bundle Class Usage Examples

Protected Properties

Property Type Description
$fallbackRoute string
$om Doctrine\Common\Persistence\ObjectManager
$pageHelper PageHelper
$pageManager Networking\InitCmsBundle\Model\PageManagerInterface
$request Symfony\Component\HttpFoundation\Request
$router Symfony\Component\Routing\RouterInterface
$serializer JMS\Serializer\Serializer

Public Methods

Method Description
__construct ( Request $request, Doctrine\Common\Persistence\ObjectManager $om, $fallbackRoute, PageHelper $pageHelper )
getPathInfo ( null $referrer = null ) : null | string Returns the uri Path for the current uri if no referrer given, otherwise it returns the path for the URL given
getQueryString ( ) : null | string Get the query string parameters for the current request Not used at present
getTranslationRoute ( $oldUrl, $locale ) : array | Route Returns the corresponding route of the given URL for the locale supplied If none is found it returns the original route object
prepareBaseUrl ( $referrer ) : boolean | string Prepares the Base URL
setPageManager ( Networking\InitCmsBundle\Model\PageManagerInterface $pageManager )
setRouter ( Symfony\Component\Routing\RouterInterface $router )
setSerializer ( JMS\Serializer\Serializer $serializer )

Protected Methods

Method Description
getUrlencodedPrefix ( $string, $prefix ) : boolean

Method Details

__construct() public method

public __construct ( Request $request, Doctrine\Common\Persistence\ObjectManager $om, $fallbackRoute, PageHelper $pageHelper )
$request Symfony\Component\HttpFoundation\Request
$om Doctrine\Common\Persistence\ObjectManager
$fallbackRoute
$pageHelper PageHelper

getPathInfo() public method

Returns the uri Path for the current uri if no referrer given, otherwise it returns the path for the URL given
public getPathInfo ( null $referrer = null ) : null | string
$referrer null
return null | string

getQueryString() public method

Get the query string parameters for the current request Not used at present
public getQueryString ( ) : null | string
return null | string

getTranslationRoute() public method

Returns the corresponding route of the given URL for the locale supplied If none is found it returns the original route object
public getTranslationRoute ( $oldUrl, $locale ) : array | Route
$oldUrl
$locale
return array | Networking\InitCmsBundle\Component\Routing\Route

getUrlencodedPrefix() protected method

protected getUrlencodedPrefix ( $string, $prefix ) : boolean
$string
$prefix
return boolean

prepareBaseUrl() public method

Prepares the Base URL
public prepareBaseUrl ( $referrer ) : boolean | string
$referrer
return boolean | string

setPageManager() public method

public setPageManager ( Networking\InitCmsBundle\Model\PageManagerInterface $pageManager )
$pageManager Networking\InitCmsBundle\Model\PageManagerInterface

setRouter() public method

public setRouter ( Symfony\Component\Routing\RouterInterface $router )
$router Symfony\Component\Routing\RouterInterface

setSerializer() public method

public setSerializer ( JMS\Serializer\Serializer $serializer )
$serializer JMS\Serializer\Serializer

Property Details

$fallbackRoute protected property

protected string $fallbackRoute
return string

$om protected property

protected ObjectManager,Doctrine\Common\Persistence $om
return Doctrine\Common\Persistence\ObjectManager

$pageHelper protected property

protected PageHelper,Networking\InitCmsBundle\Helper $pageHelper
return PageHelper

$pageManager protected property

protected PageManagerInterface,Networking\InitCmsBundle\Model $pageManager
return Networking\InitCmsBundle\Model\PageManagerInterface

$request protected property

protected Request,Symfony\Component\HttpFoundation $request
return Symfony\Component\HttpFoundation\Request

$router protected property

protected RouterInterface,Symfony\Component\Routing $router
return Symfony\Component\Routing\RouterInterface

$serializer protected property

protected Serializer,JMS\Serializer $serializer
return JMS\Serializer\Serializer