ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilRepositoryObjectSearchBlockGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/Block/classes/class.ilBlockGUI.php';
5 
18 {
19  public static $block_type = "objectsearch";
20  public static $st_data;
21 
22 
28  public function __construct($a_title)
29  {
30  global $ilCtrl, $lng;
31 
32  parent::__construct();
33 
34  $this->setEnableNumInfo(false);
35 
36  $this->setTitle($a_title);
37  $this->allow_moving = false;
38  }
39 
45  public static function getBlockType()
46  {
47  return self::$block_type;
48  }
49 
55  public static function isRepositoryObject()
56  {
57  return FALSE;
58  }
59 
63  public static function getScreenMode()
64  {
65  return IL_SCREEN_SIDE;
66  }
67 
71  public function executeCommand()
72  {
73  global $ilCtrl;
74 
75  $next_class = $ilCtrl->getNextClass();
76  $cmd = $ilCtrl->getCmd("getHTML");
77 
78  switch ($next_class)
79  {
80  default:
81  return $this->$cmd();
82  }
83  }
84 
88  public function getHTML()
89  {
90  global $ilCtrl, $lng, $ilUser;
91 
92  return parent::getHTML();
93  }
94 
98  public function fillDataSection()
99  {
100  global $ilCtrl, $lng, $ilAccess;
101 
102  $tpl = new ilTemplate("tpl.search_search_block.html", true, true, 'Services/Search');
103 
104  $lng->loadLanguageModule('search');
105  $tpl->setVariable("TXT_PERFORM", $lng->txt('btn_search'));
106  $tpl->setVariable("FORMACTION", $ilCtrl->getFormActionByClass('ilrepositoryobjectsearchgui', 'performSearch'));
107  $tpl->setVariable("SEARCH_TERM", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["search_term"])));
108 
109  $this->setDataSection($tpl->get());
110  }
111 
112 }
113 ?>
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static isRepositoryObject()
Is this a repository object.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
$cmd
Definition: sahs_server.php:35
static getScreenMode()
Get Screen Mode for current command.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
__construct($a_title)
Constructor type $ilCtrl type $lng.
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
global $lng
Definition: privfeed.php:17
This class represents a block method of a block.
const IL_SCREEN_SIDE
$_POST["username"]