PHP Class Networking\InitCmsBundle\Controller\FrontendPageController

Author: net working AG ([email protected])
Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
显示文件 Open project: networking/init-cms-bundle Class Usage Examples

Public Methods

Method Description
adminAction ( ) : RedirectResponse Redirect to the admin dashboard
adminNavbarAction ( Request $request, null $page_id = null ) : Response Deliver the admin navigation bar via ajax
changeAdminLanguageAction ( Request $request, $locale ) : RedirectResponse Change the language in the admin area (currently not implemented in the template)
changeLanguageAction ( Request $request, $locale ) : RedirectResponse Change language in the front end area
getActiveEnd ( $page ) : Datetime
getActiveStart ( $page ) : DateTime Get activeFrom
getDraftParameters ( Request $request, Networking\InitCmsBundle\Model\PageInterface $page )
getLiveParameters ( Request $request, Networking\InitCmsBundle\Model\PageSnapshot $pageSnapshot )
getPageHelper ( ) : PageHelper
getPageParameters ( Request $request )
getRedirect ( Request $request, Networking\InitCmsBundle\Model\PageInterface $page ) : boolean | RedirectResponse Check if page is an alias for another page
getSnapshotVisibility ( Networking\InitCmsBundle\Model\PageSnapshotInterface $page ) : mixed
homeAction ( Request $request ) : array Show the home page (start page) for given locale
indexAction ( Request $request ) : Response Render the page
isSnapshotActive ( Networking\InitCmsBundle\Model\PageSnapshotInterface $page ) : boolean
liveAction ( Request $request ) : Response Render the Live version of a page
pageNotFoundAction ( ) : Response
translationNotFoundAction ( Request $request ) : Response
viewDraftAction ( Request $request, string $locale, $path = null ) : RedirectResponse View the website in Draft mode
viewLiveAction ( Request $request, string $locale, $path = null ) : RedirectResponse View the website in Live mode

Protected Methods

Method Description
changeViewMode ( Request $request, $status, $path ) : RedirectResponse Change the page viewing mode to live or draft
getAdminPool ( ) : boolean | Sonata\AdminBundle\Admin\Pool
getTranslationRoute ( $referrer, $locale ) : array | Symfony\Cmf\Component\Routing\RouteObjectInterface get the route for the translation of a given page, the referrer page

Method Details

adminAction() public method

Redirect to the admin dashboard
public adminAction ( ) : RedirectResponse
return Symfony\Component\HttpFoundation\RedirectResponse

adminNavbarAction() public method

Deliver the admin navigation bar via ajax
public adminNavbarAction ( Request $request, null $page_id = null ) : Response
$request Symfony\Component\HttpFoundation\Request
$page_id null
return Symfony\Component\HttpFoundation\Response

changeAdminLanguageAction() public method

Change the language in the admin area (currently not implemented in the template)
public changeAdminLanguageAction ( Request $request, $locale ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$locale
return Symfony\Component\HttpFoundation\RedirectResponse

changeLanguageAction() public method

Change language in the front end area
public changeLanguageAction ( Request $request, $locale ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$locale
return Symfony\Component\HttpFoundation\RedirectResponse

changeViewMode() protected method

Change the page viewing mode to live or draft
protected changeViewMode ( Request $request, $status, $path ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$status
$path
return Symfony\Component\HttpFoundation\RedirectResponse

getActiveEnd() public method

public getActiveEnd ( $page ) : Datetime
return Datetime

getActiveStart() public method

Get activeFrom
public getActiveStart ( $page ) : DateTime
return DateTime

getAdminPool() protected method

protected getAdminPool ( ) : boolean | Sonata\AdminBundle\Admin\Pool
return boolean | Sonata\AdminBundle\Admin\Pool

getDraftParameters() public method

public getDraftParameters ( Request $request, Networking\InitCmsBundle\Model\PageInterface $page )
$request Symfony\Component\HttpFoundation\Request
$page Networking\InitCmsBundle\Model\PageInterface

getLiveParameters() public method

public getLiveParameters ( Request $request, Networking\InitCmsBundle\Model\PageSnapshot $pageSnapshot )
$request Symfony\Component\HttpFoundation\Request
$pageSnapshot Networking\InitCmsBundle\Model\PageSnapshot

getPageHelper() public method

public getPageHelper ( ) : PageHelper
return Networking\InitCmsBundle\Helper\PageHelper

getPageParameters() public method

public getPageParameters ( Request $request )
$request Symfony\Component\HttpFoundation\Request

getRedirect() public method

Check if page is an alias for another page
public getRedirect ( Request $request, Networking\InitCmsBundle\Model\PageInterface $page ) : boolean | RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$page Networking\InitCmsBundle\Model\PageInterface
return boolean | Symfony\Component\HttpFoundation\RedirectResponse

getSnapshotVisibility() public method

public getSnapshotVisibility ( Networking\InitCmsBundle\Model\PageSnapshotInterface $page ) : mixed
$page Networking\InitCmsBundle\Model\PageSnapshotInterface
return mixed

getTranslationRoute() protected method

get the route for the translation of a given page, the referrer page
protected getTranslationRoute ( $referrer, $locale ) : array | Symfony\Cmf\Component\Routing\RouteObjectInterface
$referrer
$locale
return array | Symfony\Cmf\Component\Routing\RouteObjectInterface

homeAction() public method

Show the home page (start page) for given locale
public homeAction ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
return array

indexAction() public method

Render the page
public indexAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

isSnapshotActive() public method

public isSnapshotActive ( Networking\InitCmsBundle\Model\PageSnapshotInterface $page ) : boolean
$page Networking\InitCmsBundle\Model\PageSnapshotInterface
return boolean

liveAction() public method

Render the Live version of a page
Deprecation: will be removed in version 3.0
public liveAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

pageNotFoundAction() public method

public pageNotFoundAction ( ) : Response
return Symfony\Component\HttpFoundation\Response

translationNotFoundAction() public method

public translationNotFoundAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response

viewDraftAction() public method

View the website in Draft mode
public viewDraftAction ( Request $request, string $locale, $path = null ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$locale string
return Symfony\Component\HttpFoundation\RedirectResponse

viewLiveAction() public method

View the website in Live mode
public viewLiveAction ( Request $request, string $locale, $path = null ) : RedirectResponse
$request Symfony\Component\HttpFoundation\Request
$locale string
return Symfony\Component\HttpFoundation\RedirectResponse