Properties

$db

$db : 

Type

$l10n

$l10n : 

Type

$pluginManager

$pluginManager : 

Type

$modules

$modules : 

Type

$formsManager

$formsManager : 

Type

$mode

$mode : 

Type

$x_end

$x_end : 

Type

$currentUser

$currentUser : 

Type

$templates

$templates : 

Type

$microtemplates

$microtemplates : 

Type

$header

$header : 

Type

$body

$body : 

Type

$footer

$footer : 

Type

$frontendMessages

$frontendMessages : 

Type

$info

$info : 

Type

$warningMessages

$warningMessages : 

Type

$errorMessages

$errorMessages : 

Type

$successMessages

$successMessages : 

Type

$infoMessages

$infoMessages : 

Type

$localizeUploadsDir

$localizeUploadsDir : 

Type

$cssList

$cssList : 

Type

$topJsList

$topJsList : 

Type

$bottomJsList

$bottomJsList : 

Type

$microJsList

$microJsList : 

Type

Methods

__construct()

__construct(  $mode) 

Parameters

$mode

getFrontendLanguage()

getFrontendLanguage() : String

Returns the current locale for frontend display

Returns

String —

the current locale displayed in frontend

getBackendLanguage()

getBackendLanguage() : String

Returns the language of the backend User Interface

Returns

String —

the current locale for backend UI

getLocale()

getLocale() : String

Returns the currently used language locale, whether you are in frontend or backend mode TODO : make this function obsolete and replace it with getEditedLocale() / getDisplayedLocale() ?

Returns

String —

the current locale displayed in frontend or edited in backend

getEditedLocale()

getEditedLocale() 

getDisplayedLocale()

getDisplayedLocale() : String

Returns the currently selected locale for current form display This function is especially usefull when editing a form widget/field. You may edit some language that is not your mother language and at the same time have the backend displayed in your mother language. Calling this function in your widget will ensure the widget will display with your current editing language in backend (say in French if your mother language is French) while you are editing a foreign language record (say in German).

The form widget/field will then also display correctly in frontend with the intended locale (German). For example, an area of use is dates, which do not display the same in French (01/12/2016) and in German (01.12.2016), thus you need to adapt the widget/field display

Returns

String —

the current locale being edited in backend

setDataEditingLanguage()

setDataEditingLanguage(  $language) : boolean

Sets the current locale for data currently being edited in backend or frontend

Parameters

$language

String an ISO2 string for the required locale

Returns

boolean

getDataEditingLanguage()

getDataEditingLanguage() : String

Returns the current locale for data currently being edited in backend or frontend

Returns

String —

the current locale for data being edited in backend

getSiteRootPages()

getSiteRootPages() 

getRootline()

getRootline(  $leafUid,   $rootLine = array()) 

Parameters

$leafUid
$rootLine

getRootlineUids()

getRootlineUids(  $leafUid,   $rootLine) 

Parameters

$leafUid
$rootLine

addTemplates()

addTemplates(  $templatesArray) 

Parameters

$templatesArray

addMicrotemplates()

addMicrotemplates(  $templatesArray) 

Parameters

$templatesArray

addWarningMessage()

addWarningMessage(  $messageText) 

Parameters

$messageText

addErrorMessage()

addErrorMessage(  $messageText) 

Parameters

$messageText

addSuccessMessage()

addSuccessMessage(  $messageText) 

Parameters

$messageText

addInfoMessage()

addInfoMessage(  $messageText) 

Parameters

$messageText

addCss()

addCss(  $cssTag,   $useInBackend,   $useInFrontend) 

Adds a CSS tag to the rendered pages

Parameters

$cssTag

string the full css tag, such as ''

$useInBackend

boolean displays the tag in backend

$useInFrontend

boolean displays the tag in frontend

addTopJs()

addTopJs(  $jsTag,   $useInBackend,   $useInFrontend) 

Adds a script tag to the top of the rendered pages

Parameters

$jsTag

string the full js tag, such as ''

$useInBackend

boolean displays the tag in backend

$useInFrontend

boolean displays the tag in frontend

addBottomJs()

addBottomJs(  $jsTag,   $useInBackend,   $useInFrontend) 

Adds a script tag to the bottom of the rendered pages

Parameters

$jsTag

string the full js tag, such as ''

$useInBackend

boolean displays the tag in backend

$useInFrontend

boolean displays the tag in frontend

addMicroJs()

addMicroJs(  $jsTag,   $useInBackend,   $useInFrontend) 

Adds a script tag to the microtemplates

Parameters

$jsTag

string the full js tag, such as ''

$useInBackend

boolean displays the tag in backend

$useInFrontend

boolean displays the tag in frontend

getCssList()

getCssList() : array

Retreives the list of CSS tags that should be output

Returns

array —

the list of css tags to be displayed

getTopJsList()

getTopJsList() : array

Retreives the list of javascript tags that should be output on top of the page

Returns

array —

the list of