Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
NavMenu.php
Go to the documentation of this file.
1 <?php
2 /*-------------------------------------------------------------------------------
3  * Xataface Web Application Framework
4  * Copyright (C) 2005-2008 Web Lite Solutions Corp (shannah@sfu.ca)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  *-------------------------------------------------------------------------------
20  */
21 require_once 'Dataface/Globals.php';
22 //require_once 'Smarty/Smarty.class.php';
23 require_once 'Dataface/SkinTool.php';
24 
26 
27 
28  var $_tables;
29  //var $_smarty;
31  var $_current;
32  function Dataface_NavMenu( $tables, $current='' ){
33  $this->_tables = $tables;
34  if ( $current ){
35  $this->_current = $current ;
36  } else {
37  foreach ( $tables as $table ){
38  $this->_current = $table;
39  break;
40  }
41  }
42 
43  //$this->_smarty = new Smarty;
44  //$this->_smarty->template_dir = $GLOBALS['Dataface_Globals_Templates'];
45  //$this->_smarty->compile_dir = $GLOBALS['Dataface_Globals_Templates_c'];
46  $this->_skinTool =& Dataface_SkinTool::getInstance();
47  }
48 
49 
50  function toHtml(){
51 
52  $context = array( 'tables'=>$this->_tables, 'current'=>$this->_current);
53  //$this->_smarty->assign($context);
54  //$this->_smarty->display('Dataface_NavMenu.html');
55  $this->_skinTool->display($context, 'Dataface_NavMenu.html');
56 
57  }
58 
59 }