[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: menu.class.php,v 1.7 2005/03/28 12:08:19 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/menu.class.php,v $ 21 * 22 */ 23 24 /** 25 \file htdocs/menu.class.php 26 \brief Fichier de la classe de gestion du menu gauche 27 \version $Revision: 1.7 $ 28 */ 29 30 31 /** 32 \class Menu 33 \brief Classe de gestion du menu gauche 34 */ 35 36 class Menu { 37 38 var $liste; 39 40 41 /** 42 * \brief Constructeur classe menu 43 */ 44 function Menu() 45 { 46 $this->liste = array(); 47 } 48 49 /** 50 * \brief Vide l'objet menu de ces entrées 51 */ 52 function clear() 53 { 54 $this->liste = array(); 55 } 56 57 /** 58 * \brief Ajoute une entrée de menu 59 * \param url Url a suivre sur le clic 60 * \param titre Libelle menu à afficher 61 * \param level Niveau du menu à ajouter 62 * \param enabled Menu actif ou non 63 */ 64 function add($url, $titre, $level=0, $enabled=1) 65 { 66 $i = sizeof($this->liste); 67 $this->liste[$i]['url'] = $url; 68 $this->liste[$i]['titre'] = $titre; 69 $this->liste[$i]['level'] = $level; 70 $this->liste[$i]['enabled'] = $enabled; 71 } 72 73 /** 74 * \brief Ajoute une entrée de menu de niveau inférieur 75 * \param url Url a suivre sur le clic 76 * \param titre Libelle menu à afficher 77 * \param level Niveau du menu à ajouter 78 * \param enabled Menu actif ou non 79 */ 80 function add_submenu($url, $titre, $level=1, $enabled=1) 81 { 82 $i = sizeof($this->liste) - 1; 83 $this->add($url, $titre, $level, $enabled); 84 } 85 86 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |