Linux-DVB-DVBT-Apps-QuartzPVR

 view release on metacpan or  search on metacpan

php/PEAR/DB/NestedSet/TigraMenu.php  view on Meta::CPAN

<?php
//
// +----------------------------------------------------------------------+
// | PEAR :: DB_NestedSet_TigraMenu                                        |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group                                |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available at through the world-wide-web at                           |
// | http://www.php.net/license/2_02.txt.                                 |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to          |
// | license@php.net so we can mail you a copy immediately.               |
// +----------------------------------------------------------------------+
// | Authors: Daniel Khan <dk@webcluster.at>                              |
// +----------------------------------------------------------------------+
//
// $Id: TigraMenu.php,v 1.6 2003/05/25 00:46:46 datenpunk Exp $
//

// {{{ DB_NestedSet_TigraMenu:: class

/**
* This class can be used to generate the data to build javascript popup menu
* from a DB_NestedSet node array.
* The Javascript part is done using the free available TigraMenu
* available at http://www.softcomplex.com/products/tigra_menu/.
* Currently version 1.0 is supported.
* Parts of this class where taken ftom the TreemMenu driver by Jason Rust
*
* @author       Daniel Khan <dk@webcluster.at>
* @package      DB_NestedSet
* @version      $Revision: 1.6 $
* @access       public
*/
// }}}
class DB_NestedSet_TigraMenu extends DB_NestedSet_Output {
    // {{{{ properties
	
	/**
	* @var integer The depth of the current menu.
	* @access private
	*/
	var $_levels	= 1;

	/**
	* @var integer The level we started at
	* @access private
	*/	
	var $_levelOffset = false;
	
	
	/**
	* @var array The current menu structure
	* @access private
	*/
	var $_structTigraMenu = false;

	/**
	* @var array The longest text for each level
	* @access private
	*/	
	var $_strlenByLevel	= array();

    // }}}
	// {{{ DB_NestedSet_TigraMenu
	
	/**
	* Constructor
	*
	* @param array $params A hash with parameters needed by the class
	* @see _createFromStructure()
	* @return bool
	**/
	function &DB_NestedSet_TigraMenu($params) {
		$this->_menu_id = $params['menu_id'];
		$this->_structTigraMenu = $this->_createFromStructure($params);
		return true;
	}
	
	// }}}
	// {{{ _createFromStructure()
	
	/**



( run in 0.407 second using v1.01-cache-2.11-cpan-364913b4093 )