RootRenderAPIΒΆ

public string getJsApiUrl ()

Returns the url for the js api

Returns:string
public insertCss (RenderAPIsRootAPIv1RenderUnit Unit rootUnit)

Output the css code

Parameters:
  • Unit $rootUnit (RenderAPIsRootAPIv1RenderUnit) – unit where css traversing starts (root module)
public array getAllModuleData (RenderAPIsRootAPIv1RenderUnit Unit rootUnit)

Returns a map list of all provided module data

Parameters:
  • Unit $rootUnit (RenderAPIsRootAPIv1RenderUnit) –
Returns:

array

public array getAllUnitData (RenderAPIsRootAPIv1RenderUnit Unit rootUnit)

Returns a map list of all provided unit data

Parameters:
  • Unit $rootUnit (RenderAPIsRootAPIv1RenderUnit) –
Returns:

array

public string getCSSUrl ()

URL of the (complete) CSS rendered in an external file.

Returns:string
public void renderUnit (RenderAPIsRootAPIv1RenderUnit Unit unit)

Triggers the rendering of the given unit with the current renderer

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) – the unit that should be rendered with the current renderer
Returns:

void

public void renderChildren (array|string unit)

Triggers the rendering of all children units of the given unit

Parameters:
  • $unit (array|string) – the unit which children units should be rendered.
Returns:

void

public string getEditableTag (RenderAPIsRootAPIv1RenderUnit Unit unit, mixed key, string tag, string attributes = '')

Returns the content for the editable html code.

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) – unit that holds the form value
  • $key (mixed) – key of the requested form value
  • $tag (string) – tag name that will be created around the editable html code
  • $attributes (string) – attributes for the created tag
Returns:

string

public RenderAPIsRootAPIv1Unit Unit|null getParentUnit (RenderAPIsRootAPIv1RenderUnit Unit unit)

Returns the parent unit for the given unit

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) – unit array or unit id
Returns:

RenderAPIsRootAPIv1Unit Unit|null

public mixed getFormValue (RenderAPIsRootAPIv1RenderUnit Unit unit, mixed key, mixed fallbackValue = NULL)

Returns the form value of the given unit

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) – unit that holds the form value
  • $key (mixed) – key of the requested form value
  • $fallbackValue (mixed) – result if formValue array misses key
Returns:

mixed

public RenderUnit Unit[] getChildren (RenderAPIsRootAPIv1RenderUnit Unit unit)

Returns a list of all children units of the given unit

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) – the unit object
Returns:

RenderUnit Unit[]

public null|RenderUnit Unit getUnitById (RenderAPIsRootAPIv1$unitId $unitId unitId)

Returns the Unit object for a given unitId, null if not found

Parameters:
  • $unitId $unitId (RenderAPIsRootAPIv1$unitId) –
Returns:

null|RenderUnit Unit

public null|RenderModuleInfo ModuleInfo getModuleInfo (RenderAPIsRootAPIv1RenderUnit Unit unit)

Returns the module info object for the given unit, null if not found

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) –
Returns:

null|RenderModuleInfo ModuleInfo

public getUnitCache (RenderAPIsRootAPIv1RenderUnit Unit unit, string key)

Get values from the permanent unit cache

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) –
  • $key (string) – unique key

throws exceptions: Exception Exception

public setUnitCache (RenderAPIsRootAPIv1RenderUnit Unit unit, string key, array value)

Set values in the permanent unit cache

Parameters:
  • Unit $unit (RenderAPIsRootAPIv1RenderUnit) –
  • $key (string) – unique key
  • $value (array) – any typ of array containing only primitive types

throws exceptions: Exception Exception

public bool isEditMode ()

Returns true if the current renderings happens inside of the rukzuk cms edit mode.

Returns:bool
public bool isPreviewMode ()

Returns true if the current renderings happens inside of the rukzuk cms preview mode.

Returns:bool
public bool isLiveMode ()

Returns true if the current rendering happens on a live server (website is deployed).

Returns:bool
public array getResolutions ()

Returns the resolutions array

Returns:array
public bool isTemplate ()

Returns true when the current rendering task renders a template

Returns:bool
public bool isPage ()

Returns true when the current rendering task renders a page

Returns:bool
public RenderAPIsRootAPIv1Navigation Navigation getNavigation ()

Returns the navigation object

Returns:RenderAPIsRootAPIv1Navigation Navigation
public string getColorById (string colorId)

Convert a color id to a rgba() value

Parameters:
  • $colorId (string) –
Returns:

string rgba() value of the given color id

public array getColorScheme ()

Returns the Color Scheme as array map

Returns:array (color-id => color-value)
public RenderAPIsRootAPIv1MediaItem MediaItem getMediaItem (string mediaId)

Returns the media item with the given media id or null if the image does not exists.

Parameters:
  • $mediaId (string) –
Returns:

RenderAPIsRootAPIv1MediaItem MediaItem

throws exceptions: MediaItemNotFoundException MediaItemNotFoundException

public string getInterfaceLanguage ()

Returns the language code of the current cms user interface.

Returns:string The language code (examples: en; de; fr)