Methods summary
public static
|
#
macro( string $name, Closure $macro )
Registers a custom macro.
Registers a custom macro.
Parameters
- $name
string $name
- $macro
Closure
$macro
|
public static
string
|
#
entities( string $value )
Convert HTML characters to entities.
Convert HTML characters to entities.
The encoding specified in the application configuration file will be
used.
Parameters
Returns
string
|
public static
string
|
#
decode( string $value )
Convert entities to HTML characters.
Convert entities to HTML characters.
Parameters
Returns
string
|
public static
string
|
#
specialchars( string $value )
Convert HTML special characters.
Convert HTML special characters.
The encoding specified in the application configuration file will be
used.
Parameters
Returns
string
|
public static
string
|
#
script( string $url, array $attributes = array() )
Generate a link to a JavaScript file.
Generate a link to a JavaScript file.
echo HTML::script('js/jquery.js');
echo HTML::script('js/jquery.js', array('defer'));
Parameters
- $url
string $url
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
style( string $url, array $attributes = array() )
Generate a link to a CSS file.
Generate a link to a CSS file.
If no media type is selected, "all" will be used.
echo HTML::style('css/common.css');
echo HTML::style('css/common.css', array('media' => 'print'));
Parameters
- $url
string $url
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
span( string $value, array $attributes = array() )
Generate a HTML span.
Parameters
- $value
string $value
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
link( string $url, string $title = null, array $attributes = array(), boolean $https = null )
Generate a HTML link.
echo HTML::link('user/profile', 'User Profile');
echo HTML::link('http://google.com', 'Google');
Parameters
- $url
string $url
- $title
string $title
- $attributes
array $attributes
- $https
boolean $https
Returns
string
|
public static
string
|
#
link_to_secure( string $url, string $title = null, array $attributes = array() )
Generate a HTTPS HTML link.
Generate a HTTPS HTML link.
Parameters
- $url
string $url
- $title
string $title
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
link_to_asset( string $url, string $title = null, array $attributes = array(), boolean $https = null )
Generate an HTML link to an asset.
Generate an HTML link to an asset.
The application index page will not be added to asset links.
Parameters
- $url
string $url
- $title
string $title
- $attributes
array $attributes
- $https
boolean $https
Returns
string
|
public static
string
|
#
link_to_secure_asset( string $url, string $title = null, array $attributes = array() )
Generate an HTTPS HTML link to an asset.
Generate an HTTPS HTML link to an asset.
Parameters
- $url
string $url
- $title
string $title
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
link_to_route( string $name, string $title = null, array $parameters = array(), array $attributes = array() )
Generate an HTML link to a route.
Generate an HTML link to a route.
An array of parameters may be specified to fill in URI segment wildcards.
echo HTML::link_to_route('profile', 'Profile');
echo HTML::link_to_route('profile', 'Profile', array('taylor'));
Parameters
- $name
string $name
- $title
string $title
- $parameters
array $parameters
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
link_to_action( string $action, string $title = null, array $parameters = array(), array $attributes = array() )
Generate an HTML link to a controller action.
Generate an HTML link to a controller action.
An array of parameters may be specified to fill in URI segment wildcards.
echo HTML::link_to_action('home@index', 'Home');
echo HTML::link_to_action('user@profile', 'Profile', array('taylor'));
Parameters
- $action
string $action
- $title
string $title
- $parameters
array $parameters
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
link_to_language( string $language, string $title = null, array $attributes = array() )
Generate an HTML link to a different language
Generate an HTML link to a different language
Parameters
- $language
string $language
- $title
string $title
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
mailto( string $email, string $title = null, array $attributes = array() )
Generate an HTML mailto link.
Generate an HTML mailto link.
The E-Mail address will be obfuscated to protect it from spam bots.
Parameters
- $email
string $email
- $title
string $title
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
email( string $email )
Obfuscate an e-mail address to prevent spam-bots from sniffing it.
Obfuscate an e-mail address to prevent spam-bots from sniffing it.
Parameters
Returns
string
|
public static
string
|
#
image( string $url, string $alt = '', array $attributes = array() )
Generate an HTML image element.
Generate an HTML image element.
Parameters
- $url
string $url
- $alt
string $alt
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
ol( array $list, array $attributes = array() )
Generate an ordered list of items.
Generate an ordered list of items.
Parameters
- $list
array $list
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
ul( array $list, array $attributes = array() )
Generate an un-ordered list of items.
Generate an un-ordered list of items.
Parameters
- $list
array $list
- $attributes
array $attributes
Returns
string
|
private static
string
|
#
listing( string $type, array $list, array $attributes = array() )
Generate an ordered or un-ordered list.
Generate an ordered or un-ordered list.
Parameters
- $type
string $type
- $list
array $list
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
dl( array $list, array $attributes = array() )
Generate a definition list.
Generate a definition list.
Parameters
- $list
array $list
- $attributes
array $attributes
Returns
string
|
public static
string
|
#
attributes( array $attributes )
Build a list of HTML attributes from an array.
Build a list of HTML attributes from an array.
Parameters
- $attributes
array $attributes
Returns
string
|
protected static
string
|
#
obfuscate( string $value )
Obfuscate a string to prevent spam-bots from sniffing it.
Obfuscate a string to prevent spam-bots from sniffing it.
Parameters
Returns
string
|
protected static
string
|
#
encoding( )
Get the appliction.encoding without needing to request it from Config::get()
each time.
Get the appliction.encoding without needing to request it from Config::get()
each time.
Returns
string
|
public static
mixed
|
#
__callStatic( string $method, array $parameters )
Dynamically handle calls to custom macros.
Dynamically handle calls to custom macros.
Parameters
- $method
string $method
- $parameters
array $parameters
Returns
mixed
|