[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
Joomla! Content Management System
Copyright: | (C) 2005 Open Source Matters, Inc. |
License: | GNU General Public License version 2 or later; see LICENSE.txt |
File Size: | 852 lines (26 kb) |
Included or required: | 0 times |
Referenced: | 2 times |
Includes or requires: | 0 files |
HtmlDocument:: (21 methods):
__construct()
getHeadData()
resetHeadData()
resetHeadDatum()
setHeadData()
mergeHeadData()
addHeadLink()
addFavicon()
addCustomTag()
isHtml5()
setHtml5()
getBuffer()
setBuffer()
parse()
render()
countModules()
countMenuChildren()
_loadTemplate()
_fetchTemplate()
_parseTemplate()
_renderTemplate()
Class: HtmlDocument - X-Ref
HtmlDocument class, provides an easy interface to parse and display a HTML document__construct($options = array() X-Ref |
Class constructor param: array $options Associative array of options |
getHeadData() X-Ref |
Get the HTML document head data return: array The document head data in array form |
resetHeadData($types = null) X-Ref |
Reset the HTML document head data param: mixed $types type or types of the heads elements to reset return: HtmlDocument instance of $this to allow chaining |
resetHeadDatum($type) X-Ref |
Reset a part the HTML document head data param: string $type type of the heads elements to reset return: void |
setHeadData($data) X-Ref |
Set the HTML document head data param: array $data The document head data in array form return: HtmlDocument|null instance of $this to allow chaining or null for empty input data |
mergeHeadData($data) X-Ref |
Merge the HTML document head data param: array $data The document head data in array form return: HtmlDocument|void instance of $this to allow chaining or void for empty input data |
addHeadLink($href, $relation, $relType = 'rel', $attribs = array() X-Ref |
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">` param: string $href The link that is being related. param: string $relation Relation of link. param: string $relType Relation type attribute. Either rel or rev (default: 'rel'). param: array $attribs Associative array of remaining attributes. return: HtmlDocument instance of $this to allow chaining |
addFavicon($href, $type = 'image/vnd.microsoft.icon', $relation = 'shortcut icon') X-Ref |
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. param: string $href The link that is being related. param: string $type File type param: string $relation Relation of link return: HtmlDocument instance of $this to allow chaining |
addCustomTag($html) X-Ref |
Adds a custom HTML string to the head block param: string $html The HTML to add to the head return: HtmlDocument instance of $this to allow chaining |
isHtml5() X-Ref |
Returns whether the document is set up to be output as HTML5 return: boolean true when HTML5 is used |
setHtml5($state) X-Ref |
Sets whether the document should be output as HTML5 param: bool $state True when HTML5 should be output return: void |
getBuffer($type = null, $name = null, $attribs = array() X-Ref |
Get the contents of a document include param: string $type The type of renderer param: string $name The name of the element to render param: array $attribs Associative array of remaining attributes. return: mixed|string The output of the renderer |
setBuffer($content, $options = array() X-Ref |
Set the contents a document includes param: string $content The content to be set in the buffer. param: array $options Array of optional elements. return: HtmlDocument instance of $this to allow chaining |
parse($params = array() X-Ref |
Parses the template and populates the buffer param: array $params Parameters for fetching the template return: HtmlDocument instance of $this to allow chaining |
render($caching = false, $params = array() X-Ref |
Outputs the template to the browser. param: boolean $caching If true, cache the output param: array $params Associative array of attributes return: string The rendered data |
countModules(string $positionName, bool $withContentOnly = false) X-Ref |
Count the modules in the given position param: string $positionName The position to use param: boolean $withContentOnly Count only a modules which actually has a content return: integer Number of modules found |
countMenuChildren() X-Ref |
Count the number of child menu items of the current active menu item return: integer Number of child menu items |
_loadTemplate($directory, $filename) X-Ref |
Load a template file param: string $directory The name of the template param: string $filename The actual filename return: string The contents of the template |
_fetchTemplate($params = array() X-Ref |
Fetch the template, and initialise the params param: array $params Parameters to determine the template return: HtmlDocument instance of $this to allow chaining |
_parseTemplate() X-Ref |
Parse a document template return: HtmlDocument instance of $this to allow chaining |
_renderTemplate() X-Ref |
Render pre-parsed template return: string rendered template |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |