Xataface Depselect Module  0.1
Dependent Select List Widget for Xataface Forms
 All Data Structures Files Functions Pages
/Volumes/Windows VMS/sites/chichaku/modules/depselect/depselect.php
Go to the documentation of this file.
1 <?php
2 /*
3  * Xataface Depselect Module
4  * Copyright (C) 2011 Steve Hannah <steve@weblite.ca>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22 
38  private $baseURL = null;
39 
40 
41 
46  function __construct(){
47  $app = Dataface_Application::getInstance();
48 
49 
50  // Now work on our dependencies
51  $mt = Dataface_ModuleTool::getInstance();
52 
53  // We require the XataJax module
54  // The XataJax module activates and embeds the Javascript and CSS tools
55  $mt->loadModule('modules_XataJax', 'modules/XataJax/XataJax.php');
56 
57 
58  // Register the tagger widget with the form tool so that it responds
59  // to widget:type=tagger
60  import('Dataface/FormTool.php');
61  $ft = Dataface_FormTool::getInstance();
62  $ft->registerWidgetHandler('depselect', dirname(__FILE__).'/widget.php', 'Dataface_FormTool_depselect');
63 
64 
65  }
66 
67 
73  public function getBaseURL(){
74  if ( !isset($this->baseURL) ){
75  $this->baseURL = Dataface_ModuleTool::getInstance()->getModuleURL(__FILE__);
76  }
77  return $this->baseURL;
78  }
79 }