Changeset 6174 for extensions/GrumPluginClasses/classes
- Timestamp:
- May 13, 2010, 10:12:38 PM (14 years ago)
- Location:
- extensions/GrumPluginClasses/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php
r6106 r6174 100 100 101 101 102 /** 103 * this function is called by the request builder to make the search page, and 104 * must return the HTML & JS code of the dialogbox used to select criterion 105 * 106 * Notes : 107 * - the dialogbox is a JS object with a public method 'show' 108 * - when the method show is called, one parameter is given by the request 109 * builder ; the parameter is an object defined as this : 110 * { 111 * cBuilder: an instance of the criteriaBuilder object used in the page, 112 * } 113 * 114 * 115 * 116 * 117 * @param String $mode : can take 'admin' or 'public' values, allowing to 118 * return different interface if needed 119 * @return String : HTML formatted value 120 */ 121 static public function getInterfaceContent($mode='admin') 122 { 123 return(""); 124 } 125 126 /** 127 * this function returns the label displayed in the criterion menu 128 * 129 * @return String : label displayed in the criterions menu 130 */ 131 static public function getInterfaceLabel() 132 { 133 return(l10n('gpc_rb_unknown_interface')); 134 } 135 136 /** 137 * this function returns the name of the dialog box class 138 * 139 * @return String : name of the dialogbox class 140 */ 141 static public function getInterfaceDBClass() 142 { 143 return(''); 144 } 145 146 102 147 } 103 148 … … 119 164 * @return Boolean : true if registering is Ok, otherwise false 120 165 */ 121 static public function register($pluginName, $fileName )166 static public function register($pluginName, $fileName, $dialogBoxObject) 122 167 { 123 168 $config=Array(); … … 127 172 'name' => $pluginName, 128 173 'fileName' => $fileName, 174 'dialogBox' => $dialogBoxObject, 129 175 'date' => date("Y-m-d H:i:s"), 130 176 'version' => self::$version, … … 880 926 881 927 928 929 /** 930 * display search page 931 */ 932 static public function displaySearchPage() 933 { 934 global $template, $lang; 935 936 load_language('rbuilder.lang', GPC_PATH); 937 938 $template->set_filename('gpc_search_page', 939 dirname(dirname(__FILE__)).'/templates/GPCRequestBuilder_search.tpl'); 940 941 $registeredPlugin=self::getRegistered(); 942 $dialogBox=Array(); 943 foreach($registeredPlugin as $key=>$val) 944 { 945 if(array_key_exists($key, $registeredPlugin)) 946 { 947 if(file_exists($registeredPlugin[$key]['fileName'])) 948 { 949 include_once($registeredPlugin[$key]['fileName']); 950 951 $dialogBox[]=Array( 952 'handle' => $val['name'].'DB', 953 'dialogBoxClass' => call_user_func(Array('RBCallBack'.$key, 'getInterfaceDBClass')), 954 'label' => call_user_func(Array('RBCallBack'.$key, 'getInterfaceLabel')), 955 'content' => call_user_func(Array('RBCallBack'.$key, 'getInterfaceContent')), 956 ); 957 } 958 } 959 } 960 961 $datas=Array( 962 'dialogBox' => $dialogBox, 963 'themeName' => $template->get_themeconf('name'), 964 ); 965 966 $template->assign('datas', $datas); 967 968 return($template->parse('gpc_search_page', true)); 969 } //displaySearchPage 970 882 971 } 883 972 -
extensions/GrumPluginClasses/classes/GPCTabSheet.class.inc.php
r5918 r6174 62 62 } 63 63 64 65 function add($name, $caption, $url, $selected = false, $onClick='') 66 { 67 if(parent::add($name,$caption,$url,$selected)) 68 { 69 $this->sheets[$name]['onClick'] = $onClick; 70 return(true); 71 } 72 return(false); 73 } 64 74 65 75 public function setClasses($classes)
Note: See TracChangeset
for help on using the changeset viewer.