API16:JHtml/addIncludePath
From Joomla! Documentation
Description
Add a directory where JHtml should search for helpers. You may either pass a string or an array of directories.
<! removed transcluded page call, red link never existed >
Syntax
static addIncludePath($path= '')
| Parameter Name | Default Value | Description |
|---|---|---|
| $path | A path to search. |
Returns
array An array with directory elements
Defined in
libraries/joomla/html/html.php
Importing
jimport( 'joomla.html.html' );
Source Body
public static function addIncludePath($path = '')
{
// force path to array
settype($path, 'array');
// loop through the path directories
foreach ($path as $dir)
{
if (!empty($dir) && !in_array($dir, JHtml::$includePaths)) {
array_unshift(JHtml::$includePaths, JPath::clean($dir));
}
}
return JHtml::$includePaths;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples