Class JDocumentHTML

Description

DocumentHTML class, provides an easy interface to parse and display a HTML document

  • since: 11.1

Located in /libraries/joomla/document/html/html.php (line 21)

JDocument
   |
   --JDocumentHTML
Variable Summary
 string $baseurl
 array $params
 string $template
 integer $_caching
 array $_custom
 array $_file
 array $_links
 string $_template
Method Summary
 JDocumentHTML __construct ([array $options = array()])
 JDocumentHTML addCustomTag (string $html)
 JDocumentHTML addFavicon (string $href, [string $type = 'image/vnd.microsoft.icon'], [string $relation = 'shortcut icon'])
 JDocumentHTML addHeadLink (string $href, string $relation, [string $relType = 'rel'], [array $attribs = array()])
 integer countMenuChildren ()
 integer countModules (string $condition)
 The getBuffer ([string $type = null], [string $name = null], [array $attribs = array()])
 array getHeadData ()
 Boolean isHtml5 ()
 JDocumentHTML mergeHeadData (array $data)
 JDocumentHTML parse ([array $params = array()])
 The render ([boolean $caching = false], [array $params = array()])
 JDocumentHTML setBuffer (string $content, [array $options = array()])
 JDocumentHTML setHeadData (array $data)
 void setHtml5 (bool $state)
 JDocumentHTML _fetchTemplate ([array $params = array()])
 string _loadTemplate (string $directory, string $filename)
 string _renderTemplate ()
Variables
string $baseurl = null (line 53)

Base url

  • since: 11.1
  • access: public
array $params = null (line 61)

Array of template parameters

  • since: 11.1
  • access: public
string $template = null (line 45)

Name of the template

  • since: 11.1
  • access: public
integer $_caching = null (line 93)

Integer with caching setting

  • since: 11.1
  • access: protected
array $_custom = array() (line 37)

Array of custom tags

  • since: 11.1
  • access: public
array $_file = null (line 69)

File name

  • since: 11.1
  • access: public
array $_links = array() (line 29)

Array of Header <link> tags

  • since: 11.1
  • access: public
string $_template = '' (line 77)

String holding parsed template

  • since: 11.1
  • access: protected
array $_template_tags = array() (line 85)

Array of parsed template JDoc tags

  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JDocument

JDocument::$base
JDocument::$description
JDocument::$direction
JDocument::$instances
JDocument::$language
JDocument::$link
JDocument::$mediaVersion
JDocument::$title
JDocument::$_buffer
JDocument::$_charset
JDocument::$_engine
JDocument::$_generator
JDocument::$_lineEnd
JDocument::$_mdate
JDocument::$_metaTags
JDocument::$_mime
JDocument::$_namespace
JDocument::$_profile
JDocument::$_script
JDocument::$_scripts
JDocument::$_style
JDocument::$_styleSheets
JDocument::$_tab
JDocument::$_type
Methods
Constructor __construct (line 110)

Class constructor

  • since: 11.1
  • access: public
JDocumentHTML __construct ([array $options = array()])
  • array $options: Associative array of options

Redefinition of:
JDocument::__construct()
Class constructor.
addCustomTag (line 317)

Adds a custom HTML string to the head block

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML addCustomTag (string $html)
  • string $html: The HTML to add to the head
addFavicon (line 300)

Adds a shortcut icon (favicon)

This adds a link to the icon shown in the favorites list or on the left of the url in the address bar. Some browsers display it on the tab, as well.

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML addFavicon (string $href, [string $type = 'image/vnd.microsoft.icon'], [string $relation = 'shortcut icon'])
  • string $href: The link that is being related.
  • string $type: File type
  • string $relation: Relation of link
addHeadLink (line 276)

Adds <link> tags to the head of the document

$relType defaults to 'rel' as it is the most common relation type used. ('rev' refers to reverse relation, 'rel' indicates normal, forward relation.) Typical tag: <link href="index.php" rel="Start">

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML addHeadLink (string $href, string $relation, [string $relType = 'rel'], [array $attribs = array()])
  • string $href: The link that is being related.
  • string $relation: Relation of link.
  • string $relType: Relation type attribute. Either rel or rev (default: 'rel').
  • array $attribs: Associative array of remaining attributes.
countMenuChildren (line 517)

Count the number of child menu items

  • return: Number of child menu items
  • since: 11.1
  • access: public
integer countMenuChildren ()
countModules (line 492)

Count the modules based on the given condition

  • return: Number of modules found
  • since: 11.1
  • access: public
integer countModules (string $condition)
  • string $condition: The condition to use
getBuffer (line 364)

Get the contents of a document include

  • return: output of the renderer
  • since: 11.1
  • access: public
The getBuffer ([string $type = null], [string $name = null], [array $attribs = array()])
  • string $type: The type of renderer
  • string $name: The name of the element to render
  • array $attribs: Associative array of remaining attributes.

Redefinition of:
JDocument::getBuffer()
Get the contents of the document buffer
getHeadData (line 128)

Get the HTML document head data

  • return: The document head data in array form
  • since: 11.1
  • access: public
array getHeadData ()
isHtml5 (line 331)

Returns whether the document is set up to be output as HTML5

  • return: true when HTML5 is used
  • since: 12.1
  • access: public
Boolean isHtml5 ()
mergeHeadData (line 192)

Merge the HTML document head data

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML mergeHeadData (array $data)
  • array $data: The document head data in array form
parse (line 450)

Parses the template and populates the buffer

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML parse ([array $params = array()])
  • array $params: Parameters for fetching the template

Redefinition of:
JDocument::parse()
Parses the document and prepares the buffers
render (line 465)

Outputs the template to the browser.

  • return: rendered data
  • since: 11.1
  • access: public
The render ([boolean $caching = false], [array $params = array()])
  • boolean $caching: If true, cache the output
  • array $params: Associative array of attributes

Redefinition of:
JDocument::render()
Outputs the document
setBuffer (line 424)

Set the contents a document includes

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML setBuffer (string $content, [array $options = array()])
  • string $content: The content to be set in the buffer.
  • array $options: Array of optional elements.

Redefinition of:
JDocument::setBuffer()
Set the contents of the document buffer
setHeadData (line 154)

Set the HTML document head data

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML setHeadData (array $data)
  • array $data: The document head data in array form
setHtml5 (line 345)

Sets whether the document should be output as HTML5

  • since: 12.1
  • access: public
void setHtml5 (bool $state)
  • bool $state: True when HTML5 should be output
_fetchTemplate (line 602)

Fetch the template, and initialise the params

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: protected
JDocumentHTML _fetchTemplate ([array $params = array()])
  • array $params: Parameters to determine the template
_loadTemplate (line 556)

Load a template file

  • return: The contents of the template
  • since: 11.1
  • access: protected
string _loadTemplate (string $directory, string $filename)
  • string $directory: The name of the template
  • string $filename: The actual filename
_parseTemplate (line 640)

Parse a document template

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: protected
JDocumentHTML _parseTemplate ()
_renderTemplate (line 682)

Render pre-parsed template

  • return: rendered template
  • since: 11.1
  • access: protected
string _renderTemplate ()

Inherited Methods

Inherited From JDocument

 JDocument::__construct()
 JDocument::addScript()
 JDocument::addScriptDeclaration()
 JDocument::addScriptVersion()
 JDocument::addStyleDeclaration()
 JDocument::addStyleSheet()
 JDocument::addStyleSheetVersion()
 JDocument::getBase()
 JDocument::getBuffer()
 JDocument::getCharset()
 JDocument::getDescription()
 JDocument::getDirection()
 JDocument::getGenerator()
 JDocument::getInstance()
 JDocument::getLanguage()
 JDocument::getLink()
 JDocument::getMediaVersion()
 JDocument::getMetaData()
 JDocument::getMimeEncoding()
 JDocument::getModifiedDate()
 JDocument::getTitle()
 JDocument::getType()
 JDocument::loadRenderer()
 JDocument::parse()
 JDocument::render()
 JDocument::setBase()
 JDocument::setBuffer()
 JDocument::setCharset()
 JDocument::setDescription()
 JDocument::setDirection()
 JDocument::setGenerator()
 JDocument::setLanguage()
 JDocument::setLineEnd()
 JDocument::setLink()
 JDocument::setMediaVersion()
 JDocument::setMetaData()
 JDocument::setMimeEncoding()
 JDocument::setModifiedDate()
 JDocument::setTab()
 JDocument::setTitle()
 JDocument::setType()
 JDocument::_getLineEnd()
 JDocument::_getTab()

Documentation generated on Tue, 19 Nov 2013 15:04:54 +0100 by phpDocumentor 1.4.3