HtmlBuilder
class HtmlBuilder (View source)
Traits
Methods
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Convert an HTML string to entities.
Convert entities to HTML characters.
Generate a link to a JavaScript file.
Generate a link to a CSS file.
Generate an HTML image element.
Generate a HTML link.
Generate a HTTPS HTML link.
Generate a HTML link to an asset.
Generate a HTTPS HTML link to an asset.
Generate a HTML link to a named route.
Generate a HTML link to a controller action.
Generate a HTML link to an email address.
Obfuscate an e-mail address to prevent spam-bots from sniffing it.
Generate an ordered list of items.
Generate an un-ordered list of items.
Build an HTML attribute string from an array.
Obfuscate a string to prevent spam-bots from sniffing it.
Details
in MacroableTrait at line line 19
static
void
macro(
string $name,
callable $macro)
Register a custom macro.
in MacroableTrait at line line 30
static
boolean
hasMacro(
string $name)
Checks if macro is registered
in MacroableTrait at line line 44
static
mixed
__callStatic(
string $method,
array $parameters)
Dynamically handle calls to the class.
in MacroableTrait at line line 63
mixed
__call(
string $method,
array $parameters)
Dynamically handle calls to the class.
at line line 58
string
script(
string $url,
array $attributes = array(),
bool $secure = null)
Generate a link to a JavaScript file.
at line line 73
string
style(
string $url,
array $attributes = array(),
bool $secure = null)
Generate a link to a CSS file.
at line line 93
string
image(
string $url,
string $alt = null,
array $attributes = array(),
bool $secure = null)
Generate an HTML image element.
at line line 109
string
link(
string $url,
string $title = null,
array $attributes = array(),
bool $secure = null)
Generate a HTML link.
at line line 126
string
secureLink(
string $url,
string $title = null,
array $attributes = array())
Generate a HTTPS HTML link.
at line line 140
string
linkAsset(
string $url,
string $title = null,
array $attributes = array(),
bool $secure = null)
Generate a HTML link to an asset.
at line line 155
string
linkSecureAsset(
string $url,
string $title = null,
array $attributes = array())
Generate a HTTPS HTML link to an asset.
at line line 169
string
linkRoute(
string $name,
string $title = null,
array $parameters = array(),
array $attributes = array())
Generate a HTML link to a named route.
at line line 183
string
linkAction(
string $action,
string $title = null,
array $parameters = array(),
array $attributes = array())
Generate a HTML link to a controller action.
at line line 196
string
mailto(
string $email,
string $title = null,
array $attributes = array())
Generate a HTML link to an email address.
at line line 213
string
email(
string $email)
Obfuscate an e-mail address to prevent spam-bots from sniffing it.
at line line 225
string
ol(
array $list,
array $attributes = array())
Generate an ordered list of items.
at line line 237
string
ul(
array $list,
array $attributes = array())
Generate an un-ordered list of items.
at line line 311
string
attributes(
array $attributes)
Build an HTML attribute string from an array.
at line line 348
string
obfuscate(
string $value)
Obfuscate a string to prevent spam-bots from sniffing it.