FreenetIS
 All Classes Namespaces Functions Variables Pages
Static Public Member Functions | List of all members
html Class Reference

Static Public Member Functions

static specialchars ($str, $double_encode=TRUE)
 Convert special characters to HTML entities.
static query_string ($array)
 Creates an HTTP query string from an array.
static anchor ($uri, $title=FALSE, $attributes=FALSE, $protocol=FALSE, $id_as_title=TRUE)
 Create HTML link anchors.
static file_anchor ($file, $title=FALSE, $attributes=FALSE, $protocol=FALSE)
 Creates an HTML anchor to a file.
static panchor ($protocol, $uri, $title=FALSE, $attributes=FALSE)
 Similar to anchor, but with the protocol parameter first.
static mailto ($email, $title=FALSE, $attributes=FALSE)
 Creates a email anchor.
static breadcrumb ($segments=NULL)
 Generate a "breadcrumb" list of anchors representing the URI.
static stylesheet ($style, $media=FALSE, $index=FALSE)
 Creates a stylesheet link.
static link ($href, $rel, $type, $suffix=FALSE, $media=FALSE, $index=FALSE)
 Creates a link tag.
static script ($script, $index=FALSE)
 Creates a script link.
static execute_script ($script)
 Creates a script link.
static image ($attr=NULL, $index=FALSE)
 Creates a image link.
static attributes ($attrs)
 Compiles an array of HTML attributes into an attribute string.
static menu_item_counter ($count, $color=NULL)
 Menu item counter for view menu.

Member Function Documentation

static html::anchor (   $uri,
  $title = FALSE,
  $attributes = FALSE,
  $protocol = FALSE,
  $id_as_title = TRUE 
)
static

Create HTML link anchors.

Parameters
stringURL or URI string
stringlink text
arrayHTML anchor attributes
stringnon-default protocol, eg: https
$id_as_titleif title is empty and link ends with ID, use ID or full uri as title?
Returns
string
static html::attributes (   $attrs)
static

Compiles an array of HTML attributes into an attribute string.

Parameters
string|arrayarray of attributes
Returns
string
static html::breadcrumb (   $segments = NULL)
static

Generate a "breadcrumb" list of anchors representing the URI.

Parameters
arraysegments to use as breadcrumbs, defaults to using Router::$segments
Returns
string
static html::execute_script (   $script)
static

Creates a script link.

Parameters
string|arrayfilename
booleaninclude the index_page in the link
Returns
string
static html::file_anchor (   $file,
  $title = FALSE,
  $attributes = FALSE,
  $protocol = FALSE 
)
static

Creates an HTML anchor to a file.

Parameters
stringname of file to link to
stringlink text
arrayHTML anchor attributes
stringnon-default protocol, eg: ftp
Returns
string
static html::image (   $attr = NULL,
  $index = FALSE 
)
static

Creates a image link.

Parameters
string|arrayarray of html attributes, or an image name
booleaninclude the index_page in the link
Returns
string
static html::link (   $href,
  $rel,
  $type,
  $suffix = FALSE,
  $media = FALSE,
  $index = FALSE 
)
static

Creates a link tag.

Parameters
string|arrayfilename
string|arrayrelationship
string|arraymimetype
stringspecifies suffix of the file
string|arrayspecifies on what device the document will be displayed
booleaninclude the index_page in the link
Returns
string
static html::mailto (   $email,
  $title = FALSE,
  $attributes = FALSE 
)
static

Creates a email anchor.

Parameters
stringemail address to send to
stringlink text
arrayHTML anchor attributes
Returns
string
static html::menu_item_counter (   $count,
  $color = NULL 
)
static

Menu item counter for view menu.

Author
Ondřej Fibich
Parameters
integer$count
string$color
static html::panchor (   $protocol,
  $uri,
  $title = FALSE,
  $attributes = FALSE 
)
static

Similar to anchor, but with the protocol parameter first.

Parameters
stringlink protocol
stringURI or URL to link to
stringlink text
arrayHTML anchor attributes
Returns
string
static html::query_string (   $array)
static

Creates an HTTP query string from an array.

Deprecated.

Parameters
arrayarray of data to convert to string
Returns
string
static html::script (   $script,
  $index = FALSE 
)
static

Creates a script link.

Parameters
string|arrayfilename
booleaninclude the index_page in the link
Returns
string
static html::specialchars (   $str,
  $double_encode = TRUE 
)
static

Convert special characters to HTML entities.

Parameters
stringstring to convert
booleanencode existing entities
Returns
string
static html::stylesheet (   $style,
  $media = FALSE,
  $index = FALSE 
)
static

Creates a stylesheet link.

Parameters
string|arrayfilename, or array of filenames to match to array of medias
string|arraymedia type of stylesheet, or array to match filenames
booleaninclude the index_page in the link
Returns
string

The documentation for this class was generated from the following file: