ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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  parent::__construct();
31 
32  $this->setEnableNumInfo(false);
33 
34  $this->setTitle($a_title);
35  $this->allow_moving = false;
36  }
37 
41  public function getBlockType() : string
42  {
43  return self::$block_type;
44  }
45 
49  protected function isRepositoryObject() : bool
50  {
51  return false;
52  }
53 
57  public static function getScreenMode()
58  {
59  return IL_SCREEN_SIDE;
60  }
61 
65  public function executeCommand()
66  {
68 
69  $next_class = $ilCtrl->getNextClass();
70  $cmd = $ilCtrl->getCmd("getHTML");
71 
72  switch ($next_class) {
73  default:
74  return $this->$cmd();
75  }
76  }
77 
81  public function getHTML()
82  {
83  return parent::getHTML();
84  }
85 
89  public function fillDataSection()
90  {
92  $lng = $this->lng;
93 
94  $tpl = new ilTemplate("tpl.search_search_block.html", true, true, 'Services/Search');
95 
96  $lng->loadLanguageModule('search');
97  $tpl->setVariable("TXT_SEARCH_INPUT_LABEL", $lng->txt('search_field'));
98  $tpl->setVariable("TXT_PERFORM", $lng->txt('btn_search'));
99  $tpl->setVariable("FORMACTION", $ilCtrl->getFormActionByClass('ilrepositoryobjectsearchgui', 'performSearch'));
100  $tpl->setVariable("SEARCH_TERM", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["search_term"])));
101 
102  $this->setDataSection($tpl->get());
103  }
104 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
static getScreenMode()
Get Screen Mode for current command.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
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
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
This class represents a block method of a block.
const IL_SCREEN_SIDE
$_POST["username"]