PHP Class Networking\InitCmsBundle\Helper\PageHelper

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

Protected Properties

Property Type Description
$container Symfony\Component\DependencyInjection\ContainerInterface

Public Methods

Method Description
camelize ( string $property ) : string Camelize a string
getFieldValue ( Networking\InitCmsBundle\Model\PageInterface $object, $fieldName, null $method = null ) : mixed Fetch the variables from the given content type object
getPageRoutePath ( $path ) : string
getParameter ( $id ) : mixed
getService ( $id ) : object
jsonPageIsActive ( $jsonString ) : boolean Returns if a page is active or inactive based on json string from page snapshot
makePageSnapshot ( Networking\InitCmsBundle\Model\PageInterface $page ) Create a snapshot of a given page.
makeTranslationCopy ( Networking\InitCmsBundle\Model\PageInterface $page, $locale ) : Page create a copy of a given page object in a given locale
matchContentRouteRequest ( Request $request ) : Request Fills the request object with the content route parameters if found
replaceSlugInPath ( $path, $id, $slug ) : mixed
setContainer ( Symfony\Component\DependencyInjection\ContainerInterface $container = null )
setFieldValue ( Networking\InitCmsBundle\Model\PageInterface $object, $fieldName, $value, null $method = null ) : mixed Set the variables to the given content type object
unserializePageSnapshotData ( Networking\InitCmsBundle\Model\PageSnapshotInterface $pageSnapshot, boolean $unserializeTranslations = true ) : Networking\InitCmsBundle\Model\PageInterface Unserialize the PageSnapshot data into a page object

Method Details

camelize() public static method

Camelize a string
public static camelize ( string $property ) : string
$property string
return string

getFieldValue() public static method

Fetch the variables from the given content type object
public static getFieldValue ( Networking\InitCmsBundle\Model\PageInterface $object, $fieldName, null $method = null ) : mixed
$object Networking\InitCmsBundle\Model\PageInterface
$fieldName
$method null
return mixed

getPageRoutePath() public static method

public static getPageRoutePath ( $path ) : string
$path
return string

getParameter() public method

public getParameter ( $id ) : mixed
$id
return mixed

getService() public method

public getService ( $id ) : object
$id
return object

jsonPageIsActive() public method

Returns if a page is active or inactive based on json string from page snapshot
public jsonPageIsActive ( $jsonString ) : boolean
$jsonString
return boolean

makePageSnapshot() public method

Create a snapshot of a given page.
public makePageSnapshot ( Networking\InitCmsBundle\Model\PageInterface $page )
$page Networking\InitCmsBundle\Model\PageInterface

makeTranslationCopy() public method

create a copy of a given page object in a given locale
public makeTranslationCopy ( Networking\InitCmsBundle\Model\PageInterface $page, $locale ) : Page
$page Networking\InitCmsBundle\Model\PageInterface
$locale
return Networking\InitCmsBundle\Model\Page

matchContentRouteRequest() public method

Fills the request object with the content route parameters if found
public matchContentRouteRequest ( Request $request ) : Request
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Request

replaceSlugInPath() public static method

public static replaceSlugInPath ( $path, $id, $slug ) : mixed
$path
$id
$slug
return mixed

setContainer() public method

public setContainer ( Symfony\Component\DependencyInjection\ContainerInterface $container = null )
$container Symfony\Component\DependencyInjection\ContainerInterface

setFieldValue() public static method

Set the variables to the given content type object
public static setFieldValue ( Networking\InitCmsBundle\Model\PageInterface $object, $fieldName, $value, null $method = null ) : mixed
$object Networking\InitCmsBundle\Model\PageInterface
$fieldName
$value
$method null
return mixed

unserializePageSnapshotData() public method

Unserialize the PageSnapshot data into a page object
public unserializePageSnapshotData ( Networking\InitCmsBundle\Model\PageSnapshotInterface $pageSnapshot, boolean $unserializeTranslations = true ) : Networking\InitCmsBundle\Model\PageInterface
$pageSnapshot Networking\InitCmsBundle\Model\PageSnapshotInterface
$unserializeTranslations boolean
return Networking\InitCmsBundle\Model\PageInterface

Property Details

$container protected property

protected ContainerInterface,Symfony\Component\DependencyInjection $container
return Symfony\Component\DependencyInjection\ContainerInterface