ZMObject
└─ZMToolboxTool
└─ZMToolboxUtils
public class ZMToolboxUtils
extends ZMToolboxTool
| Fields inherited from org.zenmagick.toolbox.ZMToolboxTool | |
|---|---|
| request_, toolbox_ | |
| Fields inherited from org.zenmagick.core.ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | cssFile(string filename, array attr) Add the given CSS file to the final contents. |
| string | encodeXML(string s) Encode XML control characters. |
| string | formatMoney(float amount, boolean convert, boolean echo) Format the given amount according to the current currency. |
| string | getTitle(string page, boolean echo) Simple title generator based on the page name. |
| void | jsBottom(string filename) Add the given JS file to the end of the final contents (before the closing element). |
| void | jsNow(string filename) Add the given JS file now. |
| void | jsTop(string filename) Add the given JS file to the header section of the final contents. |
| Methods inherited from org.zenmagick.toolbox.ZMToolboxTool | |
|---|---|
| getRequest, getToolbox, setRequest, setToolbox | |
| Methods inherited from org.zenmagick.core.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public void cssFile(string filename, array attr)
Add the given CSS file to the final contents.
The underlying code (ZMTemplateManager) will ensure that each CSS file is included once only.
public string encodeXML(string s)
Encode XML control characters.
public string formatMoney(float amount, boolean convert, boolean echo)
Format the given amount according to the current currency.
true, consider $amount to be in default currency and convert before formatting.true, the URI will be echo'ed as well as returned.public string getTitle(string page, boolean echo)
Simple title generator based on the page name.
null for the current page.true, the URI will be echo'ed as well as returned.public void jsBottom(string filename)
Add the given JS file to the end of the final contents (before the closing
element).The underlying code (ZMTemplateManager) will ensure that each JS file is included once only.
Also, if the same JS file is requested for both top and bottom, it will be included at the
top only. The same applies to calling jsNow() on a file that has been already included or is marked for
inclusion at the bottom.
public void jsNow(string filename)
Add the given JS file now.
public void jsTop(string filename)
Add the given JS file to the header section of the final contents.
The underlying code (ZMTemplateManager) will ensure that each JS file is included once only.
Generic utilities.