API15

JParameter/addElementPath

From Joomla! Documentation

< API15:JParameter
Revision as of 13:40, 12 May 2013 by JoomlaWikiBot (talk | contribs) (removing red link to edit, no existant pages)

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Add a directory where JParameter should search for element types

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

addElementPath($path)
Parameter Name Default Value Description
$path directory or directories to search.

Defined in[edit]

libraries/joomla/html/parameter.php

Importing[edit]

jimport( 'joomla.html.parameter' );

Source Body[edit]

function addElementPath( $path )
{
        // just force path to array
        settype( $path, 'array' );

        // loop through the path directories
        foreach ( $path as $dir )
        {
                // no surrounding spaces allowed!
                $dir = trim( $dir );

                // add trailing separators as needed
                if ( substr( $dir, -1 ) != DIRECTORY_SEPARATOR ) {
                        // directory
                        $dir .= DIRECTORY_SEPARATOR;
                }

                // add to the top of the search dirs
                array_unshift( $this->_elementPath, $dir );
        }


}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

<CodeExamplesForm />