ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSearchBaseGUI Class Reference
+ Inheritance diagram for ilSearchBaseGUI:
+ Collaboration diagram for ilSearchBaseGUI:

Public Member Functions

 ilSearchBaseGUI ()
 Constructor public.
 prepareOutput ()

Data Fields

 $settings = null
 $ilias = null
 $lng = null
 $tpl = null

Protected Member Functions

 addPager ($result, $a_session_key)
 Add Pager.

Protected Attributes

 $ctrl = null

Detailed Description

Definition at line 37 of file class.ilSearchBaseGUI.php.

Member Function Documentation

ilSearchBaseGUI::addPager (   $result,
  $a_session_key 
)
protected

Add Pager.

public

Parameters

Definition at line 79 of file class.ilSearchBaseGUI.php.

References $_SESSION, $result, and $tpl.

Referenced by ilAdvancedSearchGUI\performAdvMDSearch(), ilAdvancedSearchGUI\performSearch(), ilSearchGUI\performSearch(), ilAdvancedSearchGUI\showSavedAdvMDResults(), ilSearchGUI\showSavedResults(), and ilAdvancedSearchGUI\showSavedResults().

{
global $tpl;
$_SESSION["$a_session_key"] = max($_SESSION["$a_session_key"],$this->search_cache->getResultPageNumber());
if($_SESSION["$a_session_key"] == 1 and
(count($result->getResults()) < $result->getMaxHits()))
{
return true;
}
if($this->search_cache->getResultPageNumber() > 1)
{
$this->ctrl->setParameter($this,'page_number',$this->search_cache->getResultPageNumber() - 1);
$this->tpl->setCurrentBlock('prev');
$this->tpl->setVariable('PREV_LINK',$this->ctrl->getLinkTarget($this,'performSearch'));
$this->tpl->setVariable('TXT_PREV',$this->lng->txt('search_page_prev'));
$this->tpl->parseCurrentBlock();
}
for($i = 1;$i <= $_SESSION["$a_session_key"];$i++)
{
if($i == $this->search_cache->getResultPageNumber())
{
$this->tpl->setCurrentBlock('pages_link');
$this->tpl->setVariable('NUMBER',$i);
$this->tpl->parseCurrentBlock();
continue;
}
$this->ctrl->setParameter($this,'page_number',$i);
$link = '<a href="'.$this->ctrl->getLinkTarget($this,'performSearch').'" /a>'.$i.'</a> ';
$this->tpl->setCurrentBlock('pages_link');
$this->tpl->setVariable('NUMBER',$link);
$this->tpl->parseCurrentBlock();
}
if(count($result->getResults()) >= $result->getMaxHits())
{
$this->tpl->setCurrentBlock('next');
$this->ctrl->setParameter($this,'page_number',$this->search_cache->getResultPageNumber() + 1);
$this->tpl->setVariable('NEXT_LINK',$this->ctrl->getLinkTarget($this,'performSearch'));
$this->tpl->setVariable('TXT_NEXT',$this->lng->txt('search_page_next'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock('prev_next');
$this->tpl->setVariable('SEARCH_PAGE',$this->lng->txt('search_page'));
$this->tpl->parseCurrentBlock();
$this->ctrl->clearParameters($this);
}

+ Here is the caller graph for this function:

ilSearchBaseGUI::ilSearchBaseGUI ( )

Constructor public.

Definition at line 50 of file class.ilSearchBaseGUI.php.

References $ilCtrl, $ilias, $lng, and $tpl.

Referenced by ilAdvancedSearchGUI\ilAdvancedSearchGUI(), ilSearchGUI\ilSearchGUI(), and ilSearchresultGUI\ilSearchResultGUI().

{
global $ilCtrl,$ilias,$lng,$tpl,$ilMainMenu;
$this->ilias =& $ilias;
$this->ctrl =& $ilCtrl;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->lng->loadLanguageModule('search');
$ilMainMenu->setActive('search');
$this->settings =& new ilSearchSettings();
}

+ Here is the caller graph for this function:

ilSearchBaseGUI::prepareOutput ( )

Reimplemented in ilAdvancedSearchGUI, ilSearchGUI, and ilSearchresultGUI.

Definition at line 64 of file class.ilSearchBaseGUI.php.

References ilUtil\infoPanel().

{
$this->tpl->addBlockFile("CONTENT", "content", "tpl.search_base.html",'Services/Search');
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
}

+ Here is the call graph for this function:

Field Documentation

ilSearchBaseGUI::$ctrl = null
protected

Definition at line 41 of file class.ilSearchBaseGUI.php.

ilSearchBaseGUI::$ilias = null

Definition at line 42 of file class.ilSearchBaseGUI.php.

Referenced by ilSearchBaseGUI().

ilSearchBaseGUI::$lng = null

Definition at line 43 of file class.ilSearchBaseGUI.php.

Referenced by ilSearchBaseGUI().

ilSearchBaseGUI::$settings = null

Definition at line 39 of file class.ilSearchBaseGUI.php.

ilSearchBaseGUI::$tpl = null

Definition at line 44 of file class.ilSearchBaseGUI.php.

Referenced by addPager(), and ilSearchBaseGUI().


The documentation for this class was generated from the following file: