Documentation

EsiWidgetController extends EsiWidgetController

JsonAdapter Controller to handle EsiWidgets Usage: - Create a subclass that implements parseWidget() - Register it as a Controller in your ComponentController

Tags
copyright

CLOUDREXX CMS - Cloudrexx AG Thun

author

Project Team SS4U info@cloudrexx.com

subpackage

coremodule_news

version
1.0.0

Table of Contents

Properties

$cx  : Cx
Main class instance
$esiParamPage  : Page
Holds

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
getDefaultPermissions()  : Permission
Returns default permission as object
getMessagesAsString()  : string
Returns all messages as string
getName()  : string
Returns the internal name used as identifier for this adapter
getSystemComponentController()  : SystemComponentController
Returns the main controller
getWidget()  : array<string|int, mixed>
Returns the content of a widget
parseWidget()  : mixed
Parses a widget
getFileContent()  : string
Get file content
internalParseWidget()  : array<string|int, mixed>
Parses a widget
objectifyParams()  : array<string|int, mixed>
This makes object of the given params (if possible) Known params are page, lang, user, theme, channel, country, currency and ref

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

getWidget()

Returns the content of a widget

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

JsonAdapter parameters

Return values
array<string|int, mixed>

Content in an associative array

parseWidget()

Parses a widget

public parseWidget(string $name, Sigma $template, Response $response, array<string|int, mixed> $params) : mixed
Parameters
$name : string

Widget name

$template : Sigma

Widget Template

$response : Response

Response object

$params : array<string|int, mixed>

Get parameters

getFileContent()

Get file content

protected getFileContent(Theme $theme, string $fileName, mixed $response) : string
Parameters
$theme : Theme

Theme object

$fileName : string

Name of the file

$response : mixed
Return values
string

internalParseWidget()

Parses a widget

protected internalParseWidget(Widget $widget, array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$widget : Widget

The Widget

$params : array<string|int, mixed>

Params passed by ESI (/API) request

Return values
array<string|int, mixed>

Content in an associative array

objectifyParams()

This makes object of the given params (if possible) Known params are page, lang, user, theme, channel, country, currency and ref

protected objectifyParams(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Associative array of params

Return values
array<string|int, mixed>

Associative array of params


        
On this page

Search results