| // +---------------------------------------------------------------------------+ // $Id: DemoAddon.php,v 0.1 2006/01/29 23:28:37 /** * DemoAddon class * * Generates additional navigation tree (demo). * * @package navigation * @author Andrey Podshivalov * @version 0.1 * @access public * @since PHP 4.4.2 */ class DemoAddon { function init(&$output, &$section, &$aParams) { SGL::logMessage(null, PEAR_LOG_DEBUG); if (!$section->is_enabled) { return false; } $sectionId = $section->section_id; // first node $newSection = array( 'title' => 'Addon 1.0', 'section_id' => $sectionId, 'resource_uri' => 'contactus/contactus', 'is_enabled' => true, 'trans_id' => 0, ); // children node $newSection2 = array( 'title' => 'Addon 1.1', 'section_id' => $sectionId, 'resource_uri' => 'uriExternal:http://www.google.com', 'is_enabled' => true, 'children' => false, 'trans_id' => 0, ); $newSection['children'][] = (object)$newSection2; $aSections[] = (object)$newSection; // second node $newSection = array( 'title' => 'Addon 2.0', 'section_id' => $sectionId, 'resource_uri' => 'uriNode:1', 'is_enabled' => true, 'children' => false, 'trans_id' => 0, ); $aSections[] = (object)$newSection; return $aSections; } } ?>