ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
64  public function getBlockType() : string
65  {
66  return self::$block_type;
67  }
68 
72  protected function isRepositoryObject() : bool
73  {
74  return false;
75  }
76 
80  public static function getScreenMode()
81  {
82  return IL_SCREEN_SIDE;
83  }
84 
88  public function executeCommand()
89  {
91 
92  $next_class = $ilCtrl->getNextClass();
93  $cmd = $ilCtrl->getCmd("getHTML");
94 
95  switch ($next_class) {
96  default:
97  return $this->$cmd();
98  }
99  }
100 
104  public function getHTML()
105  {
107  $lng = $this->lng;
109 
110  return parent::getHTML();
111  }
112 
116  public function fillDataSection()
117  {
119  $lng = $this->lng;
120  $ilAccess = $this->access;
121 
122  $tpl = new ilTemplate("tpl.wiki_search_block.html", true, true, "Modules/Wiki");
123 
124  // go
125  $tpl->setVariable("TXT_PERFORM", $lng->txt("wiki_search"));
126  $tpl->setVariable(
127  "FORMACTION",
128  $ilCtrl->getFormActionByClass("ilobjwikigui", "performSearch")
129  );
130  $tpl->setVariable(
131  "SEARCH_TERM",
133  );
134 
135  $this->setDataSection($tpl->get());
136  }
137 }
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.
const IL_SCREEN_SIDE
$_POST["username"]