Документация по Joomla 2.5.4

Joomla.Platform\JDocumentHTML
libraries/joomla/document/html/html.php at line 22

Class JDocumentHTML

JObject
└─JDocument
└─JDocumentHTML

public class JDocumentHTML
extends JDocument

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

Subpackage:
Document
Since:
11.1

Field Summary
protected integer

$_caching

Integer with caching setting

array

$_custom

Array of custom tags

array

$_file

File name

array

$_links

Array of Header tags

protected string

$_template

String holding parsed template

protected array

$_template_tags

Array of parsed template JDoc tags

string

$baseurl

Base url

array

$params

Array of template parameters

string

$template

Name of the template

Fields inherited from Joomla.Platform\JDocument
_buffer, _charset, _engine, _generator, _lineEnd, _mdate, _metaTags, _mime, _namespace, _profile, _script, _scripts, _style, _styleSheets, _tab, _type, base, description, direction, instances, language, link, title
Fields inherited from Joomla.Platform\JObject
_errors
Constructor Summary
void

__construct(array options, mixed properties)

Class constructor

Method Summary
array

getHeadData()

Get the HTML document head data

JDocumentHTML

setHeadData(array data)

Set the HTML document head data

JDocumentHTML

mergeHeadData(array data)

Merge the HTML document head data

JDocumentHTML

addHeadLink(string href, string relation, string relType, array attribs)

Adds tags to the head of the document$relType defaults to 'rel' as it is the most common relation type used.

JDocumentHTML

addFavicon(string href, string type, string relation)

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.

JDocumentHTML

addCustomTag(string html)

Adds a custom HTML string to the head block

The

getBuffer(string type, string name, array attribs)

Get the contents of a document include

JDocumentHTML

setBuffer(string content, array options)

Set the contents a document includes

JDocumentHTML

parse(array params)

Parses the template and populates the buffer

The

render(boolean caching, array params, boolean cache)

Outputs the template to the browser.

integer

countModules(string condition)

Count the modules based on the given condition

integer

countMenuChildren()

Count the number of child menu items

protected static string

_loadTemplate(string directory, string filename)

Load a template file

protected JDocumentHTML

_fetchTemplate(array params)

Fetch the template, and initialise the params

protected JDocumentHTML

_parseTemplate()

Parse a document template

protected string

_renderTemplate()

Render pre-parsed template

Methods inherited from Joomla.Platform\JDocument
__construct, _getLineEnd, _getTab, addScript, addScriptDeclaration, addStyleDeclaration, addStyleSheet, getBase, getBuffer, getCharset, getDescription, getDirection, getGenerator, getInstance, getLanguage, getLink, getMetaData, getMimeEncoding, getModifiedDate, getTitle, getType, loadRenderer, parse, render, setBase, setBuffer, setCharset, setDescription, setDirection, setGenerator, setLanguage, setLineEnd, setLink, setMetaData, setMimeEncoding, setModifiedDate, setTab, setTitle, setType
Methods inherited from Joomla.Platform\JObject
__construct, __toString, def, get, getError, getErrors, getProperties, set, setError, setProperties, toString

Field Detail

libraries/joomla/document/html/html.php at line 94

_caching

protected integer $_caching = null

Integer with caching setting

Since:
11.1

libraries/joomla/document/html/html.php at line 38

_custom

public array $_custom = array()

Array of custom tags

Since:
11.1

libraries/joomla/document/html/html.php at line 70

_file

public array $_file = null

File name

Since:
11.1

libraries/joomla/document/html/html.php at line 30 public array $_links = array()

Array of Header tags

Since:
11.1

libraries/joomla/document/html/html.php at line 78

_template

protected string $_template = ''

String holding parsed template

Since:
11.1

libraries/joomla/document/html/html.php at line 86

_template_tags

protected array $_template_tags = array()

Array of parsed template JDoc tags

Since:
11.1

libraries/joomla/document/html/html.php at line 54

baseurl

public string $baseurl = null

Base url

Since:
11.1

libraries/joomla/document/html/html.php at line 62

params

public array $params = null

Array of template parameters

Since:
11.1

libraries/joomla/document/html/html.php at line 46

template

public string $template = null

Name of the template

Since:
11.1

Constructor Detail

libraries/joomla/document/html/html.php at line 103

__construct

public void __construct(array options, mixed properties)

Class constructor

Parameters:
options - Associative array of options
Since:
11.1

Method Detail

libraries/joomla/document/html/html.php at line 121

getHeadData

public array getHeadData()

Get the HTML document head data

Returns:
The document head data in array form
Since:
11.1

libraries/joomla/document/html/html.php at line 146

setHeadData

public JDocumentHTML setHeadData(array data)

Set the HTML document head data

Parameters:
data - The document head data in array form
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 176

mergeHeadData

public JDocumentHTML mergeHeadData(array data)

Merge the HTML document head data

Parameters:
data - The document head data in array form
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 260

addHeadLink

public JDocumentHTML addHeadLink(string href, string relation, string relType, array attribs)

Adds 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:

Parameters:
href - The link that is being related.
relation - Relation of link.
relType - Relation type attribute. Either rel or rev (default: 'rel').
attribs - Associative array of remaining attributes.
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 284

addFavicon

public JDocumentHTML addFavicon(string href, string type, string relation)

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.

Parameters:
href - The link that is being related.
type - File type
relation - Relation of link
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 301

addCustomTag

public JDocumentHTML addCustomTag(string html)

Adds a custom HTML string to the head block

Parameters:
html - The HTML to add to the head
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 319

getBuffer

public The getBuffer(string type, string name, array attribs)

Get the contents of a document include

Parameters:
type - The type of renderer
name - The name of the element to render
attribs - Associative array of remaining attributes.
Returns:
output of the renderer
Since:
11.1

libraries/joomla/document/html/html.php at line 387

setBuffer

public JDocumentHTML setBuffer(string content, array options)

Set the contents a document includes

Parameters:
content - The content to be set in the buffer.
options - Array of optional elements.
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 412

parse

public JDocumentHTML parse(array params)

Parses the template and populates the buffer

Parameters:
params - Parameters for fetching the template
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 427

render

public The render(boolean caching, array params, boolean cache)

Outputs the template to the browser.

Parameters:
caching - If true, cache the output
params - Associative array of attributes
Returns:
rendered data
Since:
11.1

libraries/joomla/document/html/html.php at line 454

countModules

public integer countModules(string condition)

Count the modules based on the given condition

Parameters:
condition - The condition to use
Returns:
Number of modules found
Since:
11.1

libraries/joomla/document/html/html.php at line 479

countMenuChildren

public integer countMenuChildren()

Count the number of child menu items

Returns:
Number of child menu items
Since:
11.1

libraries/joomla/document/html/html.php at line 517

_loadTemplate

protected static string _loadTemplate(string directory, string filename)

Load a template file

Parameters:
directory - The name of the template
filename - The actual filename
Returns:
The contents of the template
Since:
11.1

libraries/joomla/document/html/html.php at line 563

_fetchTemplate

protected JDocumentHTML _fetchTemplate(array params)

Fetch the template, and initialise the params

Parameters:
params - Parameters to determine the template
Returns:
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 605

_parseTemplate

protected JDocumentHTML _parseTemplate()

Parse a document template

Returns:
parsed contents of the template
instance of $this to allow chaining
Since:
11.1

libraries/joomla/document/html/html.php at line 647

_renderTemplate

protected string _renderTemplate()

Render pre-parsed template

Returns:
rendered template
Since:
11.1

Документация по Joomla 2.5.4