Documentation

JsonBlockController extends Controller
in package
implements JsonAdapter

JSON Adapter for Block

Tags
copyright

Cloudrexx AG

author

Project Team SS4U info@cloudrexx.com

subpackage

module_block

Table of Contents

Interfaces

JsonAdapter
JSON Adapter for JSON requests

Properties

$cx  : Cx
Main class instance
$messages  : array<string|int, mixed>
List of messages

Methods

__call()  : mixed
Route methods like getName(), getType(), getDirectory(), etc.
__construct()  : mixed
Creates new controller
getAccessableMethods()  : array<string|int, mixed>
Returns an array of method names accessable from a JSON request
getBlock()  : array<string|int, mixed>
Gets every block attribute for given block and version
getBlockContent()  : string
Get the block content as html
getBlocks()  : array<string|int, mixed>
Returns all available blocks for each language
getCountries()  : array<string|int, mixed>
Get countries from given name
getDefaultPermissions()  : object
Returns default permission as object
getMessagesAsString()  : string
Returns all messages as string
getName()  : string
Returns the internal name used as identifier for this adapter
getRandomBlockContent()  : mixed
Fetch content for ESI requests of random block widgets
getSystemComponentController()  : SystemComponentController
Returns the main controller
saveBlockContent()  : bool
Save the block content
getVersionValue()  : mixed
Processes and returns value of related block entities stored in block

Properties

Methods

__call()

Route methods like getName(), getType(), getDirectory(), etc.

public __call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
$methodName : string

Name of method to call

$arguments : array<string|int, mixed>

List of arguments for the method to call

Attributes
#[ReturnTypeWillChange]
Return values
mixed

Return value of the method to call

getAccessableMethods()

Returns an array of method names accessable from a JSON request

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

List of method names

getBlock()

Gets every block attribute for given block and version

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

all given params from http request

Tags
throws
NotEnoughArgumentsException

if not enough arguments are provided

throws
NoBlockFoundException

if the requested block can't be found

throws
NoBlockVersionFoundException

if the requested block version can't be found

Return values
array<string|int, mixed>

$blockVersion all attributes from block

getBlocks()

Returns all available blocks for each language

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

List of blocks (lang => id )

getCountries()

Get countries from given name

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

Get parameters,

Return values
array<string|int, mixed>

Array of countries

getDefaultPermissions()

Returns default permission as object

public getDefaultPermissions() : object
Return values
object

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

getRandomBlockContent()

Fetch content for ESI requests of random block widgets

public getRandomBlockContent(mixed $params) : mixed
Parameters
$params : mixed
Tags
todo

This is legacy code and must be replaced by proper EsiWidget implementation through a EsiWidgetController.

getVersionValue()

Processes and returns value of related block entities stored in block

protected getVersionValue(mixed $className, mixed $data, mixed $attributes, mixed $idAttributes) : mixed
Parameters
$className : mixed

string full qualified class name to get repo

$data : mixed

array serialized data

$attributes : mixed

array wanted attributes of entity

$idAttributes : mixed

array wanted attributes to get an ID on

Tags
@return

$entityValue array processed entity value


        
On this page

Search results