Class TemplateHelpers (namespace Nette\Templates)
Standard template helpers shipped with Nette Framework.
Public Method Summary | |
---|---|
TemplateHelpers |
__construct
()
Static class - cannot be instantiated.
|
static string |
bytes
(int $bytes)
Converts to human readable file size.
|
static string |
date
(string|int|DateTime $value, [string $format =
"%x" ])
Date/time formatting.
|
static string |
escapeCss
(string $s)
Escapes string for use inside CSS template.
|
static string |
escapeHtml
(mixed $s)
Escapes string for use inside HTML template.
|
static string |
escapeHtmlCss
(string $s)
Escapes string for use inside HTML style attribute.
|
static string |
escapeHtmlJs
(mixed $s)
Escapes string for use inside HTML JavaScript attribute.
|
static string |
escapeJs
(mixed $s)
Escapes string for use inside JavaScript template.
|
static string |
escapeXML
(string $s)
Escapes string for use inside XML 1.0 template.
|
static string |
Indents the HTML content from the left.
|
static callback |
loader
(string $helper)
Try to load the requested helper.
|
static string |
strip
(string $s)
Replaces all repeated white spaces with a single space.
|
Method Details | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 36 __constructpublic TemplateHelpers __construct () Static class - cannot be instantiated.
|
||||||||||||||||||
line 202 bytespublic static string bytes (int $bytes) Converts to human readable file size.
|
||||||||||||||||||
line 189 datepublic static string date (string|int|DateTime $value, [string $format = Date/time formatting.
|
||||||||||||||||||
line 98 escapeCsspublic static string escapeCss (string $s) Escapes string for use inside CSS template.
|
||||||||||||||||||
line 69 escapeHtmlpublic static string escapeHtml (mixed $s) Escapes string for use inside HTML template.
|
||||||||||||||||||
line 111 escapeHtmlCsspublic static string escapeHtmlCss (string $s) Escapes string for use inside HTML style attribute.
|
||||||||||||||||||
line 135 escapeHtmlJspublic static string escapeHtmlJs (mixed $s) Escapes string for use inside HTML JavaScript attribute.
|
||||||||||||||||||
line 123 escapeJspublic static string escapeJs (mixed $s) Escapes string for use inside JavaScript template.
|
||||||||||||||||||
line 84 escapeXMLpublic static string escapeXML (string $s) Escapes string for use inside XML 1.0 template.
|
||||||||||||||||||
line 161 indentpublic static string indent (string $s, [int $level = Indents the HTML content from the left.
|
||||||||||||||||||
line 48 loaderpublic static callback loader (string $helper) Try to load the requested helper.
|
||||||||||||||||||
line 147 strippublic static string strip (string $s) Replaces all repeated white spaces with a single space.
|