Documentation

JsonPage
in package
implements JsonAdapter

JSON Adapter for Cx\Core\ContentManager\Model\Entity\Page

Tags
copyright

Cloudrexx AG

author

Florian Schuetz florian.schuetz@comvation.com

author

Michael Ritter michael.ritter@comvation.com

subpackage

core_json

Table of Contents

Interfaces

JsonAdapter
JSON Adapter for JSON requests

Properties

$messages  : mixed
$tz  : mixed
$db  : mixed
$em  : mixed
$fallbacks  : mixed
$logRepo  : mixed
$multipleSetState  : mixed
$nodeRepo  : mixed
$pageRepo  : mixed

Methods

__construct()  : mixed
Constructor
get()  : array<string|int, mixed>
Sends data to the client
getAccessableMethods()  : array<string|int, mixed>
Returns an array of method names accessable from a JSON request
getAccessData()  : array<string|int, mixed>
Returns the access data array
getDefaultPermissions()  : object
Returns default permission as object
getHistoryTable()  : mixed
Get the page logs
getMessagesAsString()  : string
Returns all messages as string
getName()  : string
Returns the internal name used as identifier for this adapter
getPathByTarget()  : string
Returns the page path of the given target (node placeholder).
isBroken()  : bool
Checks if the passed page or its redirect target page is broken.
loadApplicationTemplate()  : array<string|int, mixed>
load the application template based on the application, cmd and theme name
multipleSet()  : mixed
Sets multiple pages.
multipleSetShutdown()  : mixed
readDirs()  : array<string|int, mixed>
read the files under the given path directory
set()  : type
Handles request from the client
setPagePreview()  : array<string|int, mixed>
Sets the page object in the session and returns the link to the page (frontend).
addHistoryEntries()  : mixed
getAliasArray()  : array<string|int, string>
Returns an array of alias slugs
getFallbackPageArray()  : array<string|int, mixed>
Returns the array representation of a fallback page
getPageArray()  : array<string|int, mixed>
Creates the page array representation of a page
validatePageArray()  : array<string|int, mixed>
Returns a validated page array.

Properties

Methods

get()

Sends data to the client

public get(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Client parameters

Tags
todo

Clean up usage of $param

throws
Exception

If the page could not be found

Return values
array<string|int, mixed>

Page as array

getAccessableMethods()

Returns an array of method names accessable from a JSON request

public getAccessableMethods() : array<string|int, mixed>
Tags
author

Michael Ritter michael.ritter@comvation.com

Return values
array<string|int, mixed>

List of method names

getAccessData()

Returns the access data array

public getAccessData([type $page = null ]) : array<string|int, mixed>
Parameters
$page : type = null

Unused

Return values
array<string|int, mixed>

Access data

getDefaultPermissions()

Returns default permission as object

public getDefaultPermissions() : object
Return values
object

getHistoryTable()

Get the page logs

public getHistoryTable(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>

Arguments passed from JsonData

Tags
todo

This method should be called using the Plain output module and should then response with Response::send()

throws
Exception

getMessagesAsString()

Returns all messages as string

public getMessagesAsString() : string
Return values
string

HTML encoded error messages

getName()

Returns the internal name used as identifier for this adapter

public getName() : string
Return values
string

Name of this adapter

getPathByTarget()

Returns the page path of the given target (node placeholder).

public getPathByTarget(array<string|int, mixed> $arguments) : string

If the target page doesn't exist, the path of the error page will be returned.

Parameters
$arguments : array<string|int, mixed>
Return values
string

$path

isBroken()

Checks if the passed page or its redirect target page is broken.

public isBroken(array<string|int, mixed> $arguments) : bool
Parameters
$arguments : array<string|int, mixed>
Return values
bool

loadApplicationTemplate()

load the application template based on the application, cmd and theme name

public loadApplicationTemplate() : array<string|int, mixed>
Return values
array<string|int, mixed>

multipleSet()

Sets multiple pages.

public multipleSet(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>

Client parameters.

readDirs()

read the files under the given path directory

public readDirs(string $path) : array<string|int, mixed>
Parameters
$path : string
Return values
array<string|int, mixed>

set()

Handles request from the client

public set(array<string|int, mixed> $params) : type
Parameters
$params : array<string|int, mixed>

Client parameters

Tags
todo

Clean up usage of $param and $_GET

global

Array $_CORELANG Core language data

Return values
type

setPagePreview()

Sets the page object in the session and returns the link to the page (frontend).

public setPagePreview(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

[link] The link to the page (frontend).

addHistoryEntries()

private addHistoryEntries(mixed $page, mixed $username, BackendTable $table, mixed $row[, mixed $version = '' ][, mixed $path = '' ]) : mixed
Parameters
$page : mixed
$username : mixed
$table : BackendTable
$row : mixed
$version : mixed = ''
$path : mixed = ''

getAliasArray()

Returns an array of alias slugs

private getAliasArray(Page $page) : array<string|int, string>
Parameters
$page : Page

Page to get the aliases of

Return values
array<string|int, string>

getFallbackPageArray()

Returns the array representation of a fallback page

private getFallbackPageArray(Node $node, string $lang) : array<string|int, mixed>
Parameters
$node : Node

Node to get the page of

$lang : string

Language code to get the fallback of

Return values
array<string|int, mixed>

Array representing a fallback page

getPageArray()

Creates the page array representation of a page

private getPageArray(Page $page) : array<string|int, mixed>
Parameters
$page : Page

Page to "arrayify"

Return values
array<string|int, mixed>

Array representing a page

validatePageArray()

Returns a validated page array.

private validatePageArray(array<string|int, mixed> $page[, bool $initAllFields = true ]) : array<string|int, mixed>
Parameters
$page : array<string|int, mixed>
$initAllFields : bool = true

By default, the returned $output will have set all page properties. Even those not set by $page. Set to false to only set properties on $output that are set in $page.

Return values
array<string|int, mixed>

$output


        
On this page

Search results