Resource

Syntax

	resource($userObject, $icon, $label, $tooltip, $cssClass, $url, $type)

Description

Creates a resource object with the given values. A resource object corresponds to the representation of an object in the application interface. The representation consists of an icon and a descriptive text. A tooltip is optionally displayed above both and when clicking on the representation, the application jumps to the standard view of the represented object. With the resource function, either the representation of a specified object can be adapted, or a self-defined jump target with freely definable values can be created.

Parameter

Name Type Description Mandatory Default
userObject User object The object that serves as the basis for the resource. no null
icon Icon/Icon Source An icon that will be displayed no The icon for the given type (e.g. "application/pdf") or the icon of the user object.
label String/Internationalized text The text to be displayed no The icon for the specified user object.
tooltip String/Internationalized text The tooltip that will be displayed above the rendering. no The tooltip for the specified label (if the label was specified as a translation key). If no label was specified, the tooltip for the specified user object.
cssClass String CSS class to add to the rendering. no null
url string The URL to be opened when the resource is clicked. no Jump to the specified user object.
type String The MIME type from which an icon should be derived if not explicitly given (e.g. "application/pdf"). no null

Return value

type: resource

Examples

	resource(null, "css:far fa-thumbs-up", #("Daumen hoch"@de,"Thumbs up"@en), "Some tooltip")