ZMObject
└─ZMToolboxTool
└─ZMToolboxHtml
public class ZMToolboxHtml
extends ZMToolboxTool
| Fields inherited from org.zenmagick.mvc.toolbox\ZMToolboxTool | |
|---|---|
| request_, toolbox_ | |
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| string | backLink(string text, array attr) Create a full back link. |
| static string | encode(string s) Encode a given string to valid HTML. |
| string | ezpageLink(integer id, string text, array attr) Create a full HTML <a> tag pointig to an ezpage. |
| string | fieldMessages(string name, boolean echo) Show form field specific error messages. |
| string | hrefTarget(boolean newWin) Create a HTML target or onclick attribute for a HTML <a> tag. |
| string | image(ZMImageInfo imageInfo, string format, mixed parameter) Creates a HTML <img> tag for the given ZMImageInfo. |
| static string | more(string s, int max, string more) Truncate text. |
| string | productImageLink(ZMProduct product, int categoryId, array attr, string format) Create a HTML <a> tag with the product image of the given product. |
| string | strip(string text) Strip HTML tags from the given text. |
| static string | text2html(string s) Convert text based user input into HTML. |
| Methods inherited from org.zenmagick.mvc.toolbox\ZMToolboxTool | |
|---|---|
| __construct, getRequest, getToolbox, setRequest, setToolbox | |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public string backLink(string text, array attr)
Create a full back link.
Return a full HTML <a> tag.
Since the link text may be HTML, no HTML escaping is done in this method.
<a> tag.public static string encode(string s)
Encode a given string to valid HTML.
public string ezpageLink(integer id, string text, array attr)
Create a full HTML <a> tag pointig to an ezpage.
Since the link text may be HTML, no HTML escaping is done on the $text parameter.
null to use the ezpage title as link text.public string fieldMessages(string name, boolean echo)
Show form field specific error messages.
The generated ul tag will have the value [$name]Info as id, and
a class of fieldMsg.
Each li will have the type as class assigned.
Messages are HTML escaped/encoded but no further localization is done.
true, the URI will be echo'ed as well as returned.null.public string hrefTarget(boolean newWin)
Create a HTML target or onclick attribute for a HTML <a> tag.
Behaviour is controlled with the ZenMagick setting isJSTarget.
true, HTML for opening in a new window will be created.public string image(ZMImageInfo imageInfo, string format, mixed parameter)
Creates a HTML <img> tag for the given ZMImageInfo.
ZMProducts::IMAGE_SMALL, ZMProducts::IMAGE_MEDIUM or ZMProducts::IMAGE_LARGE; default is >ZMProducts::IMAGE_SMALL.<mg> tag; can be either a query string style list of name/value pairs or a map.<img> tag.public static string more(string s, int max, string more)
Truncate text.
public string productImageLink(ZMProduct product, int categoryId, array attr, string format)
Create a HTML <a> tag with the product image of the
given product.
This one will return a fully encoded HTML <img> tag.
null.ZMProducts::IMAGE_SMALL, ZMProducts::IMAGE_MEDIUM or ZMProducts::IMAGE_LARGE; default is ZMProducts::IMAGE_SMALL.<a> tag.public string strip(string text)
Strip HTML tags from the given text.
public static string text2html(string s)
Convert text based user input into HTML.
HTML utilities.