Contentserv PHP API

CSApp extends CSAppObject
in package

This class represents the base class of all app related objects.

Tags

Table of Contents

SIZE_LARGE  = \AppRestservice::APPLICATION_SIZE_LARGE
SIZE_MEDIUM  = \AppRestservice::APPLICATION_SIZE_MEDIUM
SIZE_SMALL  = \AppRestservice::APPLICATION_SIZE_SMALL
TRANSLATION_CONTEXT_APPLICATION  = \AppRestservice::TRANSLATION_CONTEXT_APPLICATION
TRANSLATION_CONTEXT_GLOBAL  = \AppRestservice::TRANSLATION_CONTEXT_GLOBAL
TRANSLATION_CONTEXT_MODULE  = \AppRestservice::TRANSLATION_CONTEXT_MODULE
TRANSLATION_CONTEXT_SCREEN  = \AppRestservice::TRANSLATION_CONTEXT_SCREEN
getDescription()  : string
Returns the description of the app if defined in the Details.json.
getForName()  : CSApp
Creates an app for the specified name.
getLabel()  : string
Returns the label (nice name) of the app if defined in the Details.json.
getName()  : string
Returns the name of the app.
getParameters()  : array<string|int, mixed>
Returns all parameters defined for the app in large size.
getParametersForSize()  : array<string|int, mixed>
Returns all parameters defined for the app in the specified size.
getPath()  : string
Returns the file path of the app.
getScreenForName()  : CSAppScreen
returns the object for the screen with the specified name.
getScreens()  : array<string|int, mixed>
Returns all screens defined for the app.
getScreensWithEntryPoint()  : array<string|int, CSAppScreen>
Returns all screens that can be used as entry points to the app.
getScreensWithEntryPointForSize()  : array<string|int, mixed>
Returns all screens that can be used as entry points to the app for a given app size.
getStartScreenName()  : string
Returns the start screen name for the app.
getSupportedSizes()  : int
Returns the size definition of the app that tells what sizes it supports.
getTranslations()  : array<string|int, mixed>
returns an array of translations available for the app.
importTranslations()  : void
imports a translation array in the format that getTranslations is returning into the application's translation files.
translate()  : string
Translates the passed key based on the defined context. If no translation is found for the current context, it is cascaded to higher contexts in the following order:

Constants

SIZE_LARGE

public mixed SIZE_LARGE = \AppRestservice::APPLICATION_SIZE_LARGE
Tags

SIZE_MEDIUM

public mixed SIZE_MEDIUM = \AppRestservice::APPLICATION_SIZE_MEDIUM
Tags

SIZE_SMALL

public mixed SIZE_SMALL = \AppRestservice::APPLICATION_SIZE_SMALL
Tags

TRANSLATION_CONTEXT_APPLICATION

public mixed TRANSLATION_CONTEXT_APPLICATION = \AppRestservice::TRANSLATION_CONTEXT_APPLICATION
Tags

TRANSLATION_CONTEXT_GLOBAL

public mixed TRANSLATION_CONTEXT_GLOBAL = \AppRestservice::TRANSLATION_CONTEXT_GLOBAL
Tags

TRANSLATION_CONTEXT_MODULE

public mixed TRANSLATION_CONTEXT_MODULE = \AppRestservice::TRANSLATION_CONTEXT_MODULE
Tags

TRANSLATION_CONTEXT_SCREEN

public mixed TRANSLATION_CONTEXT_SCREEN = \AppRestservice::TRANSLATION_CONTEXT_SCREEN
Tags

Methods

getDescription()

Returns the description of the app if defined in the Details.json.

public getDescription() : string
Tags
access

public

Return values
string

The description of the app.

getForName()

Creates an app for the specified name.

public static getForName(string $sName) : CSApp
Parameters
$sName : string

The name of the app to retrieve.

Tags
throws
CSException

If the app with the specified name does not exist.

access

public

Return values
CSApp

The app object for the app matching the specified name.

getLabel()

Returns the label (nice name) of the app if defined in the Details.json.

public getLabel([bool $bStrictMode = false ]) : string
Parameters
$bStrictMode : bool = false

True will strictly return label is available else empty string, false will return unique technical app name if label is not available

Tags
access

public

Return values
string

The label (nice name) of the app or empty string.

getName()

Returns the name of the app.

public getName() : string
Tags
access

public

Return values
string

The name of the app.

getParameters()

Returns all parameters defined for the app in large size.

public getParameters() : array<string|int, mixed>
Tags
access

public

Return values
array<string|int, mixed>

The list of parameters defined for the app.

getParametersForSize()

Returns all parameters defined for the app in the specified size.

public getParametersForSize(int $iSize) : array<string|int, mixed>
Parameters
$iSize : int

The app size for which the parameter should be returned as one of the SIZE_*-constant.

Tags
access

public

Return values
array<string|int, mixed>

The list of parameters defined for the app in the specified size.

getPath()

Returns the file path of the app.

public getPath() : string
Tags
access

public

Return values
string

The file path of the app.

getScreenForName()

returns the object for the screen with the specified name.

public getScreenForName(string $sName) : CSAppScreen
Parameters
$sName : string

The name of the screen.

Tags
access

public

Return values
CSAppScreen

The screen object matching the name.

getScreens()

Returns all screens defined for the app.

public getScreens() : array<string|int, mixed>
Tags
access

public

Return values
array<string|int, mixed>

The list of screens of the app as CSAppScreen-objects.

getScreensWithEntryPoint()

Returns all screens that can be used as entry points to the app.

public getScreensWithEntryPoint() : array<string|int, CSAppScreen>
Tags
access

public

Return values
array<string|int, CSAppScreen>

The list of screens of the app that can be used as entry points as CSAppScreen-objects.

getScreensWithEntryPointForSize()

Returns all screens that can be used as entry points to the app for a given app size.

public getScreensWithEntryPointForSize(int $iSize) : array<string|int, mixed>
Parameters
$iSize : int

The app size which is requested.

Tags
access

public

Return values
array<string|int, mixed>

The list of screens of the app that can be used as entry points as CSAppScreen-objects for a given app size.

getStartScreenName()

Returns the start screen name for the app.

public getStartScreenName() : string
Tags
access

public

Return values
string

The name of the default start screen of the app.

getSupportedSizes()

Returns the size definition of the app that tells what sizes it supports.

public getSupportedSizes() : int
Tags
access

public

Return values
int

An integer defining the supported sizes. It is a combination of one or more CSApp::SIZE_* constants.

getTranslations()

returns an array of translations available for the app.

public getTranslations() : array<string|int, mixed>
Tags
access

public

Return values
array<string|int, mixed>

Array containing keys for global and screen translations.

importTranslations()

imports a translation array in the format that getTranslations is returning into the application's translation files.

public importTranslations(array<string|int, mixed> $aTranslations) : void
Parameters
$aTranslations : array<string|int, mixed>

The translations to import.

Tags
access

public

Return values
void

translate()

Translates the passed key based on the defined context. If no translation is found for the current context, it is cascaded to higher contexts in the following order:

public translate(mixed $sKey, mixed $sContext[, mixed $sContextValue = '' ]) : string

TRANSLATION_CONTEXT_SCREEN TRANSLATION_CONTEXT_APPLICATION TRANSLATION_CONTEXT_MODULE TRANSLATION_CONTEXT_GLOBAL

Parameters
$sKey : mixed
$sContext : mixed
$sContextValue : mixed = ''
Tags
access

public

Return values
string

The translated value.


        

Search results