RenderAPIΒΆ

public void renderUnit (RenderAPIsAPIv1RenderUnit Unit unit)

Triggers the rendering of the given unit with the current renderer

Parameters:
  • Unit $unit (RenderAPIsAPIv1RenderUnit) – 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 (RenderAPIsAPIv1RenderUnit Unit unit, mixed key, string tag, string attributes = '')

Returns the content for the editable html code.

Parameters:
  • Unit $unit (RenderAPIsAPIv1RenderUnit) – 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 RenderAPIsAPIv1Unit Unit|null getParentUnit (RenderAPIsAPIv1RenderUnit Unit unit)

Returns the parent unit for the given unit

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

RenderAPIsAPIv1Unit Unit|null

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

Returns the form value of the given unit

Parameters:
  • Unit $unit (RenderAPIsAPIv1RenderUnit) – 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 (RenderAPIsAPIv1RenderUnit Unit unit)

Returns a list of all children units of the given unit

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

RenderUnit Unit[]

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

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

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

null|RenderUnit Unit

public null|RenderModuleInfo ModuleInfo getModuleInfo (RenderAPIsAPIv1RenderUnit Unit unit)

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

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

null|RenderModuleInfo ModuleInfo

public getUnitCache (RenderAPIsAPIv1RenderUnit Unit unit, string key)

Get values from the permanent unit cache

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

throws exceptions: Exception Exception

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

Set values in the permanent unit cache

Parameters:
  • Unit $unit (RenderAPIsAPIv1RenderUnit) –
  • $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 RenderAPIsAPIv1Navigation Navigation getNavigation ()

Returns the navigation object

Returns:RenderAPIsAPIv1Navigation 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 RenderAPIsAPIv1MediaItem 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:

RenderAPIsAPIv1MediaItem 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)