API15:JApplication/appendPathWay
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Deprecated functions Deprecated, use JPathWay->addItem() method instead.
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
appendPathWay($name, $link=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | ||
| $link | null |
Defined in
libraries/joomla/application/application.php
Importing
jimport( 'joomla.application.application' );
Source Body
function appendPathWay( $name, $link = null ) { /* * To provide backward compatability if no second parameter is set * set it to null */ if ($link == null) { $link = ''; } $pathway =& $this->getPathway(); if( defined( '_JLEGACY' ) && $link == '' ) { $matches = array(); $links = preg_match_all ( '/<a[^>]+href="([^"]*)"[^>]*>([^<]*)<\/a>/ui', $name, $matches, PREG_SET_ORDER ); foreach( $matches AS $match) { // Add each item to the pathway object if( !$pathway->addItem( $match[2], $match[1] ) ) { return false; } } return true; } else { // Add item to the pathway object if ($pathway->addItem($name, $link)) { return true; } } return false; }
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />
