JDocumentHTML: Difference between revisions
From Joomla! Documentation
m →User contributed notes: moving preparation |
m preparing for archive only |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
=={{JVer|11.1}} JDocumentHTML== | =={{JVer|11.1}} JDocumentHTML== | ||
===Description=== | ===Description=== | ||
This class defines a web page document. Note that templates are executed within the scope of this object, so <code>$this</code> in a template is an object of type [[JDocumentHTML]]. | |||
< | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
| Line 14: | Line 12: | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::__construct | |[[API17:JDocumentHTML::__construct|__construct]] | ||
|Class constructor. | |Class constructor. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::addCustomTag | |[[API17:JDocumentHTML::addCustomTag|addCustomTag]] | ||
|Adds a custom html string to the head block. | |Adds a custom html string to the head block. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::addFavicon | |[[API17:JDocumentHTML::addFavicon|addFavicon]] | ||
|Adds a shortcut icon (favicon). | |Adds a shortcut icon (favicon). | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::addHeadLink | |[[API17:JDocumentHTML::addHeadLink|addHeadLink]] | ||
|Adds <link> tags to the head of the document. | |Adds <link> tags to the head of the document. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::countMenuChildren | |[[API17:JDocumentHTML::countMenuChildren|countMenuChildren]] | ||
|Count the number of child menu items. | |Count the number of child menu items. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::countModules | |[[API17:JDocumentHTML::countModules|countModules]] | ||
|Count the modules based on the given condition. | |Count the modules based on the given condition. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::getBuffer | |[[API17:JDocumentHTML::getBuffer|getBuffer]] | ||
|Get the contents of a document include. | |Get the contents of a document include. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::getHeadData | |[[API17:JDocumentHTML::getHeadData|getHeadData]] | ||
|Get the html document head data. | |Get the html document head data. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::mergeHeadData | |[[API17:JDocumentHTML::mergeHeadData|mergeHeadData]] | ||
|Merge the html document head data. | |Merge the html document head data. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::parse | |[[API17:JDocumentHTML::parse|parse]] | ||
|Parses the template and populates the buffer. | |Parses the template and populates the buffer. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::render | |[[API17:JDocumentHTML::render|render]] | ||
|Outputs the template to the browser. | |Outputs the template to the browser. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::setBuffer | |[[API17:JDocumentHTML::setBuffer|setBuffer]] | ||
|Set the contents a document includes. | |Set the contents a document includes. | ||
|- | |- | ||
|public | |public | ||
|[[JDocumentHTML::setHeadData | |[[API17:JDocumentHTML::setHeadData|setHeadData]] | ||
|Set the html document head data. | |Set the html document head data. | ||
|- | |- | ||
|protected | |protected | ||
|[[JDocumentHTML::_fetchTemplate | |[[API17:JDocumentHTML::_fetchTemplate|_fetchTemplate]] | ||
|Fetch the template, and initialise the params. | |Fetch the template, and initialise the params. | ||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/document/html/html.php | * '''Defined in''' libraries/joomla/document/html/html.php | ||
* '''Extends''' [[JDocument | * '''Extends''' [[API17:JDocument|JDocument]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.document.html.html' );</source> | <source lang="php">jimport( 'joomla.document.html.html' );</source> | ||
===See also=== | ===See also=== | ||
* {{JVer|11.1}} '''JDocumentHTML source code''' on [[jplatform:document/html/html.php|BitBucket]] | * {{JVer|11.1}} '''JDocumentHTML source code''' on [[jplatform:document/html/html.php|BitBucket]] | ||
* {{JVer|11.1}} Subpackage [[Subpackage Document | * {{JVer|11.1}} Subpackage [[API17:Subpackage Document|Document]] | ||
* [[JDocumentHTML|Other versions of JDocumentHTML]] | * [[API17:JDocumentHTML|Other versions of JDocumentHTML]] | ||
===User contributed notes=== | ===User contributed notes=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JDocumentHTML | category=JDocumentHTML | ||
namespace=CodeExample | |||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
Latest revision as of 02:53, 25 March 2017
JDocumentHTML
Description
This class defines a web page document. Note that templates are executed within the scope of this object, so $this in a template is an object of type JDocumentHTML.
Methods
| Visibility | Method name | Description |
|---|---|---|
| public | __construct | Class constructor. |
| public | addCustomTag | Adds a custom html string to the head block. |
| public | addFavicon | Adds a shortcut icon (favicon). |
| public | addHeadLink | Adds <link> tags to the head of the document. |
| public | countMenuChildren | Count the number of child menu items. |
| public | countModules | Count the modules based on the given condition. |
| public | getBuffer | Get the contents of a document include. |
| public | getHeadData | Get the html document head data. |
| public | mergeHeadData | Merge the html document head data. |
| public | parse | Parses the template and populates the buffer. |
| public | render | Outputs the template to the browser. |
| public | setBuffer | Set the contents a document includes. |
| public | setHeadData | Set the html document head data. |
| protected | _fetchTemplate | Fetch the template, and initialise the params. |
- Defined in libraries/joomla/document/html/html.php
- Extends JDocument
Importing
jimport( 'joomla.document.html.html' );
See also
JDocumentHTML source code on BitBucket
Subpackage Document- Other versions of JDocumentHTML
User contributed notes
Code Examples