Xataface 2.0
Xataface Application Framework
Dataface/NavMenu.php
Go to the documentation of this file.
00001 <?php
00002 /*-------------------------------------------------------------------------------
00003  * Xataface Web Application Framework
00004  * Copyright (C) 2005-2008 Web Lite Solutions Corp (shannah@sfu.ca)
00005  * 
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  *-------------------------------------------------------------------------------
00020  */
00021 require_once 'Dataface/Globals.php';
00022 //require_once 'Smarty/Smarty.class.php';
00023 require_once 'Dataface/SkinTool.php';
00024 
00025 class Dataface_NavMenu {
00026         
00027         
00028         var $_tables;
00029         //var $_smarty;
00030         var $_skinTool;
00031         var $_current;
00032         function Dataface_NavMenu( $tables, $current='' ){
00033                 $this->_tables = $tables;
00034                 if ( $current ){
00035                         $this->_current = $current ;
00036                 } else {
00037                         foreach ( $tables as $table ){
00038                                 $this->_current = $table;
00039                                 break;
00040                         }
00041                 }
00042                 
00043                 //$this->_smarty = new Smarty;
00044                 //$this->_smarty->template_dir = $GLOBALS['Dataface_Globals_Templates'];
00045                 //$this->_smarty->compile_dir = $GLOBALS['Dataface_Globals_Templates_c'];
00046                 $this->_skinTool =& Dataface_SkinTool::getInstance();
00047         }
00048         
00049         
00050         function toHtml(){
00051         
00052                 $context = array( 'tables'=>$this->_tables, 'current'=>$this->_current);
00053                 //$this->_smarty->assign($context);
00054                 //$this->_smarty->display('Dataface_NavMenu.html');
00055                 $this->_skinTool->display($context, 'Dataface_NavMenu.html');
00056         
00057         }
00058         
00059 }
 All Data Structures Namespaces Files Functions Variables Enumerations