ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
4include_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 {
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 {
91 $this->setDataSection($this->getLegacyContent());
92 }
93
94 //
95 // New rendering
96 //
97
98 protected $new_rendering = true;
99
100
104 protected function getLegacyContent() : string
105 {
108
109 $tpl = new ilTemplate("tpl.search_search_block.html", true, true, 'Services/Search');
110
111 $lng->loadLanguageModule('search');
112 $tpl->setVariable("TXT_SEARCH_INPUT_LABEL", $lng->txt('search_field'));
113 $tpl->setVariable("TXT_PERFORM", $lng->txt('btn_search'));
114 $tpl->setVariable("FORMACTION", $ilCtrl->getFormActionByClass('ilrepositoryobjectsearchgui', 'performSearch'));
115 $tpl->setVariable("SEARCH_TERM", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["search_term"])));
116
117 return $tpl->get();
118 }
119}
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
const IL_SCREEN_SIDE
This class represents a block method of a block.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setTitle($a_title)
Set Title.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
isRepositoryObject()
Returns whether block has a corresponding repository object.bool
__construct($a_title)
Constructor @global type $ilCtrl @global type $lng.
static getScreenMode()
Get Screen Mode for current command.
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
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc