ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilWikiSearchBlockGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once("Services/Block/classes/class.ilBlockGUI.php");
25 
35 {
36  public static $block_type = "wikisearch";
37  public static $st_data;
38 
42  public function __construct()
43  {
44  global $DIC;
45 
46  $this->ctrl = $DIC->ctrl();
47  $this->lng = $DIC->language();
48  $this->user = $DIC->user();
49  $this->access = $DIC->access();
50  $lng = $DIC->language();
51 
52  parent::__construct();
53 
54  $lng->loadLanguageModule("wiki");
55  $this->setEnableNumInfo(false);
56 
57  $this->setTitle($lng->txt("wiki_wiki_search"));
58  $this->allow_moving = false;
59  }
60 
66  public static function getBlockType()
67  {
68  return self::$block_type;
69  }
70 
76  public static function isRepositoryObject()
77  {
78  return false;
79  }
80 
84  public static function getScreenMode()
85  {
86  return IL_SCREEN_SIDE;
87  }
88 
92  public function executeCommand()
93  {
95 
96  $next_class = $ilCtrl->getNextClass();
97  $cmd = $ilCtrl->getCmd("getHTML");
98 
99  switch ($next_class) {
100  default:
101  return $this->$cmd();
102  }
103  }
104 
108  public function getHTML()
109  {
111  $lng = $this->lng;
113 
114  return parent::getHTML();
115  }
116 
120  public function fillDataSection()
121  {
123  $lng = $this->lng;
124  $ilAccess = $this->access;
125 
126  $tpl = new ilTemplate("tpl.wiki_search_block.html", true, true, "Modules/Wiki");
127 
128  // go
129  $tpl->setVariable("TXT_PERFORM", $lng->txt("wiki_search"));
130  $tpl->setVariable(
131  "FORMACTION",
132  $ilCtrl->getFormActionByClass("ilobjwikigui", "performSearch")
133  );
134  $tpl->setVariable(
135  "SEARCH_TERM",
137  );
138 
139  $this->setDataSection($tpl->get());
140  }
141 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
global $DIC
Definition: saml.php:7
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
BlockGUI class for wiki searchblock.
static getScreenMode()
Get Screen Mode for current command.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
getHTML()
Get bloch HTML code.
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title)
Set Title.
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
fillDataSection()
Fill data section.
This class represents a block method of a block.
static isRepositoryObject()
Is this a repository object.
static getBlockType()
Get block type.
const IL_SCREEN_SIDE
$_POST["username"]