Class TemplateHelpers
Standard template run-time helpers shipped with Nette Framework.
final public
|
#
__construct(
)
Static class – cannot be instantiated. Static class – cannot be instantiated. |
public static
callback
|
#
loader(
string
$helper
)
Try to load the requested helper. Try to load the requested helper. Parameters$helper string helper name |
public static
string
|
#
escapeHtml(
mixed
$s
)
Escapes string for use inside HTML template. Escapes string for use inside HTML template. Parameters$s mixed UTF-8 encoding or 8-bit |
public static
string
|
#
escapeHtmlComment(
mixed
$s
)
Escapes string for use inside HTML comments. Escapes string for use inside HTML comments. Parameters$s mixed UTF-8 encoding or 8-bit |
public static
string
|
#
escapeXML(
string
$s
)
Escapes string for use inside XML 1.0 template. Escapes string for use inside XML 1.0 template. Parameters$s string UTF-8 encoding or 8-bit |
public static
string
|
#
escapeCss(
string
$s
)
Escapes string for use inside CSS template. Escapes string for use inside CSS template. Parameters$s string UTF-8 encoding or 8-bit |
public static
string
|
#
escapeHtmlCss(
string
$s
)
Escapes string for use inside HTML style attribute. Escapes string for use inside HTML style attribute. Parameters$s string UTF-8 encoding or 8-bit |
public static
string
|
#
escapeJs(
mixed
$s
)
Escapes string for use inside JavaScript template. Escapes string for use inside JavaScript template. Parameters$s mixed UTF-8 encoding |
public static
string
|
#
escapeHtmlJs(
mixed
$s
)
Escapes string for use inside HTML JavaScript attribute. Escapes string for use inside HTML JavaScript attribute. Parameters$s mixed UTF-8 encoding |
public static
string
|
#
strip(
string
$s
)
Replaces all repeated white spaces with a single space. Replaces all repeated white spaces with a single space. Parameters$s string UTF-8 encoding or 8-bit |
public static
string
|
#
indent(
string
$s,
int
$level = 1,
string
$chars = ' '
)
Indents the HTML content from the left. Indents the HTML content from the left. Parameters$s string UTF-8 encoding or 8-bit$level int$chars string |
public static
string
|
#
date(
string|int|DateTime
$time,
string
$format = NULL
)
Date/time formatting. Date/time formatting. Parameters$time string|int|DateTime$format string |
public static
string
|
#
bytes(
int
$bytes,
int
$precision = 2
)
Converts to human readable file size. Converts to human readable file size. Parameters$bytes int$precision int |
public static
int
|
#
length(
mixed
$var
)
Returns array of string length. Returns array of string length. Parameters$var mixed |
public static
string
|
#
replace(
string
$subject,
string
$search,
string
$replacement = ''
)
Performs a search and replace. Performs a search and replace. Parameters$subject string$search string$replacement string |
public static
string
|
#
null(
mixed
$value
)
/dev/null. /dev/null. Parameters$value mixed |
static
string
|
$dateFormat | '%x' |
default date format # |