Hide last authors
Pierre Dubois 3.1 1 Some utility functions, especially for emails notifications
Pierre Dubois 1.1 2
3
4
Pierre Dubois 3.1 5 == Functions ==
Pierre Dubois 1.1 6 === SUImpersonate() ===
Pierre Dubois 3.1 7 Impersonate the execution thread as a super user (Admin with all privileges)
Pierre Dubois 1.1 8
9 === GetLink(obj, actionName, params) ===
10
Pierre Dubois 3.1 11 * obj. The target entity
12 * actionName. The action to be used. optional. Default value is "get"
13 * params. Optional parameters
Pierre Dubois 1.1 14
Pierre Dubois 3.1 15 return: A direct link on the target object. (URL link). The object may be any entity.
16 example:
17 {{code language="javascript"}}
18 ${Utils.GetLink(assignment, "approve")}
19 {{/code}}
Pierre Dubois 1.1 20
Pierre Dubois 3.1 21 return: The URL as a string
Pierre Dubois 1.1 22 === ExtractTextFromHTML(txt) ===
Pierre Dubois 3.1 23 Extract the text component for an HTML content
Pierre Dubois 1.1 24
Pierre Dubois 3.1 25 return: the text part
Pierre Dubois 1.1 26 === GetPropertyTitle(appname, propname) ===
27
28
Pierre Dubois 3.1 29 return: The property title of a property of an entity
30 example:
31 {{code language="javascript"}}
32 ${Utils.getPropertyTitle("rqTimeOffRequest", "rqBeneficiary")}
33 {{/code}}
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation