ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 {
30 global $ilCtrl, $lng;
31
32 parent::ilBlockGUI();
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?>
global $tpl
Definition: ilias.php:8
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.
__construct($a_title)
Constructor @global type $ilCtrl @global type $lng.
static getScreenMode()
Get Screen Mode for current command.
static isRepositoryObject()
Is this a repository object.
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
$_POST['username']
Definition: cron.php:12
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35
global $ilUser
Definition: imgupload.php:15