Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($options=array()) | |
getHeadData () | |
resetHeadData ($types=null) | |
setHeadData ($data) | |
mergeHeadData ($data) | |
addHeadLink ($href, $relation, $relType='rel', $attribs=array()) | |
addFavicon ($href, $type='image/vnd.microsoft.icon', $relation='shortcut icon') | |
addCustomTag ($html) | |
isHtml5 () | |
setHtml5 ($state) | |
setBuffer ($content, $options=array()) | |
parse ($params=array()) | |
render ($caching=false, $params=array()) | |
countModules (string $positionName, bool $withContentOnly=false) | |
countMenuChildren () | |
Fonctions membres publiques hérités de Document | |
__construct ($options=array()) | |
setFactory (FactoryInterface $factory) | |
setType ($type) | |
getType () | |
getBuffer () | |
setBuffer ($content, $options=array()) | |
getMetaData ($name, $attribute='name') | |
setMetaData ($name, $content, $attribute='name') | |
addScript ($url, $options=array(), $attribs=array()) | |
addScriptDeclaration ($content, $type='text/javascript') | |
addScriptOptions ($key, $options, $merge=true) | |
getScriptOptions ($key=null) | |
addStyleSheet ($url, $options=array(), $attribs=array()) | |
addStyleDeclaration ($content, $type='text/css') | |
setCharset ($type='utf-8') | |
getCharset () | |
setLanguage ($lang='en-gb') | |
getLanguage () | |
setDirection ($dir='ltr') | |
getDirection () | |
setTitle ($title) | |
getTitle () | |
setMediaVersion ($mediaVersion) | |
getMediaVersion () | |
setPreloadManager (PreloadManagerInterface $preloadManager) | |
getPreloadManager () | |
setWebAssetManager (WebAssetManager $webAsset) | |
getWebAssetManager () | |
setBase ($base) | |
getBase () | |
setDescription ($description) | |
getDescription () | |
setLink ($url) | |
getLink () | |
setGenerator ($generator) | |
getGenerator () | |
setModifiedDate ($date) | |
getModifiedDate () | |
setMimeEncoding ($type='text/html', $sync=true) | |
getMimeEncoding () | |
setLineEnd ($style) | |
_getLineEnd () | |
setTab ($string) | |
_getTab () | |
loadRenderer ($type) | |
parse ($params=array()) | |
render ($cache=false, $params=array()) | |
Fonctions membres publiques hérités de CacheControllerFactoryAwareInterface | |
setCacheControllerFactory (CacheControllerFactoryInterface $factory) | |
Champs de données | |
$_links = array() | |
$_custom = array() | |
$template = null | |
$baseurl = null | |
$params = null | |
$_file = null | |
$cspNonce = null | |
Champs de données hérités de Document | |
$title = '' | |
$description = '' | |
$link = '' | |
$base = '' | |
$language = 'en-gb' | |
$direction = 'ltr' | |
$_generator = 'Joomla! - Open Source Content Management' | |
$_mdate = '' | |
$_tab = "\11" | |
$_lineEnd = "\12" | |
$_charset = 'utf-8' | |
$_mime = '' | |
$_namespace = '' | |
$_profile = '' | |
$_scripts = array() | |
$_script = array() | |
$_styleSheets = array() | |
$_style = array() | |
$_metaTags = array() | |
$_engine = null | |
$_type = null | |
Fonctions membres protégées | |
_loadTemplate ($directory, $filename) | |
_fetchTemplate ($params=array()) | |
_parseTemplate () | |
_renderTemplate () | |
Fonctions membres protégées hérités de Document | |
preloadAssets () | |
Attributs protégés | |
$_template = '' | |
$_template_tags = array() | |
$_caching = null | |
Attributs protégés hérités de Document | |
$scriptOptions = array() | |
$mediaVersion = null | |
$factory | |
$preloadManager = null | |
$preloadTypes = ['preload', 'dns-prefetch', 'preconnect', 'prefetch', 'prerender'] | |
$webAssetManager = null | |
Fonctions membres privées | |
resetHeadDatum ($type) | |
Attributs privés | |
$html5 = true | |
Membres hérités additionnels | |
Fonctions membres publiques statiques hérités de Document | |
static | getInstance ($type='html', $attributes=array()) |
Attributs publics statiques hérités de Document | |
static | $_buffer = null |
Attributs protégés statiques hérités de Document | |
static | $instances = array() |
HtmlDocument class, provides an easy interface to parse and display a HTML document
__construct | ( | $options = array() | ) |
Class constructor
array | $options | Associative array of options |
Références $options, Symfony\Contracts\Service\__construct(), et Document\setMimeEncoding().
|
protected |
Fetch the template, and initialise the params
array | $params | Parameters to determine the template |
Références $baseDir, $lang, $params, $template, $this, Uri\base(), InputFilter\getInstance(), et JPATH_BASE.
|
protected |
Load a template file
string | $directory | The name of the template |
string | $filename | The actual filename |
|
protected |
Parse a document template
Références $attribs, $i, $messages, $name, $this, $type, elseif, null, et Utility\parseAttributes().
|
protected |
Render pre-parsed template
Références Document\getBuffer().
addCustomTag | ( | $html | ) |
Adds a custom HTML string to the head block
string | $html | The HTML to add to the head |
addFavicon | ( | $href, | |
$type = 'image/vnd.microsoft.icon' , |
|||
$relation = 'shortcut icon' |
|||
) |
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.
string | $href | The link that is being related. |
string | $type | File type |
string | $relation | Relation of link |
addHeadLink | ( | $href, | |
$relation, | |||
$relType = 'rel' , |
|||
$attribs = array() |
|||
) |
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">
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 | ( | ) |
Count the number of child menu items of the current active menu item
Références $active, $app, $db, $menu, $query, Joomla\CMS\MVC\Model\getDbo(), et ParameterType\INTEGER.
countModules | ( | string | $positionName, |
bool | $withContentOnly = false |
||
) |
Count the modules in the given position
string | $positionName | The position to use |
boolean | $withContentOnly | Count only a modules which actually has a content |
Références $module, $modules, $renderer, $result, ModuleHelper\getModules(), et Document\loadRenderer().
getHeadData | ( | ) |
Get the HTML document head data
Références Document\$_metaTags, Document\$_script, Document\$_scripts, Document\$_style, Document\$_styleSheets, $data, Document\$description, Document\$link, Document\$scriptOptions, Document\$title, $wa, Text\getScriptStrings(), et Document\getWebAssetManager().
isHtml5 | ( | ) |
Returns whether the document is set up to be output as HTML5
mergeHeadData | ( | $data | ) |
Merge the HTML document head data
array | $data | The document head data in array form |
Références Document\$_scripts, Document\$_styleSheets, $data, $hash, $key, Document\$link, $script, Document\$scriptOptions, $style, $this, $type, $wa, Document\addScriptDeclaration(), Document\addScriptOptions(), Document\addStyleDeclaration(), description, Document\getWebAssetManager(), et Document\setMetaData().
parse | ( | $params = array() | ) |
Parses the template and populates the buffer
array | $params | Parameters for fetching the template |
Références $params.
render | ( | $caching = false , |
|
$params = array() |
|||
) |
Outputs the template to the browser.
boolean | $caching | If true, cache the output |
array | $params | Associative array of attributes |
Références $data, $params, et Document\parse().
resetHeadData | ( | $types = null | ) |
Reset the HTML document head data
mixed | $types | type or types of the heads elements to reset |
Références $this, $type, et description.
|
private |
setBuffer | ( | $content, | |
$options = array() |
|||
) |
Set the contents a document includes
string | $content | The content to be set in the buffer. |
array | $options | Array of optional elements. |
setHeadData | ( | $data | ) |
Set the HTML document head data
array | $data | The document head data in array form |
Références Document\$_metaTags, Document\$_script, Document\$_scripts, Document\$_style, Document\$_styleSheets, $data, Document\$description, Document\$link, $this, Document\$title, $wa, description, Document\getWebAssetManager(), et null.
setHtml5 | ( | $state | ) |
Sets whether the document should be output as HTML5
bool | $state | True when HTML5 should be output |
Références $state.
|
protected |
$_custom = array() |
$_file = null |
$_links = array() |
|
protected |
|
protected |
$baseurl = null |
$cspNonce = null |
|
private |
$params = null |
$template = null |