ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSubItemListGUI Class Reference

Base class for all sub item list gui's. More...

+ Inheritance diagram for ilSubItemListGUI:
+ Collaboration diagram for ilSubItemListGUI:

Public Member Functions

 __construct ($a_cmd_class)
 Constructor.
 getCmdClass ()
 get cmd class
 setHighlighter ($a_highlighter)
 set highlighter
 getHighlighter ()
 get highlighter
 getRefId ()
 get ref id
 getObjId ()
 get obj id
 getType ()
 get type
 getSubItemIds ($a_limited=false)
 get sub item ids
 getItemListGUI ()
 get item list gui
 init ($item_list_gui, $a_ref_id, $a_subitem_ids)
 init
 getHTML ()

Static Public Member Functions

static setShowDetails ($a_obj_id)
 set show details.
static resetDetails ()
 reset details As long as static::resetDetails is not possible this method is final
static enabledDetails ($a_obj_id)
 enabled show details As long as static::enableDetails is not possible this method is final

Protected Member Functions

 showDetailsLink ()
 show details link

Protected Attributes

 $cmdClass = null
 $tpl

Static Protected Attributes

static $MAX_SUBITEMS = 5

Private Attributes

 $highlighter = null
 $subitem_ids = array()
 $item_list_gui
 $ref_id
 $obj_id
 $type

Static Private Attributes

static $details = array()

Detailed Description

Base class for all sub item list gui's.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 36 of file class.ilSubItemListGUI.php.

Constructor & Destructor Documentation

ilSubItemListGUI::__construct (   $a_cmd_class)

Constructor.

Parameters
@return

Definition at line 58 of file class.ilSubItemListGUI.php.

References ilSearchSettings\getInstance().

{
$this->cmdClass = $a_cmd_class;
self::$MAX_SUBITEMS = ilSearchSettings::getInstance()->getMaxSubitems();
}

+ Here is the call graph for this function:

Member Function Documentation

static ilSubItemListGUI::enabledDetails (   $a_obj_id)
staticfinal

enabled show details As long as static::enableDetails is not possible this method is final

Parameters
int$a_obj_idobject id
Returns
bool

Definition at line 99 of file class.ilSubItemListGUI.php.

References $_SESSION.

{
return isset($_SESSION['lucene_search']['details'][$a_obj_id]) and $_SESSION['lucene_search']['details'][$a_obj_id];
}
ilSubItemListGUI::getCmdClass ( )

get cmd class

Returns

Definition at line 108 of file class.ilSubItemListGUI.php.

References $cmdClass.

Referenced by showDetailsLink().

{
}

+ Here is the caller graph for this function:

ilSubItemListGUI::getHighlighter ( )
ilSubItemListGUI::getItemListGUI ( )
ilSubItemListGUI::getRefId ( )

get ref id

Returns

Definition at line 138 of file class.ilSubItemListGUI.php.

References $ref_id.

Referenced by ilObjMediaPoolSubItemListGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilObjWikiSubItemListGUI\getHTML(), and init().

{
return $this->ref_id;
}

+ Here is the caller graph for this function:

ilSubItemListGUI::getSubItemIds (   $a_limited = false)

get sub item ids

Parameters
bool$a_limited
Returns

Definition at line 166 of file class.ilSubItemListGUI.php.

References $subitem_ids, and getObjId().

Referenced by ilObjForumSubItemListGUI\getHTML(), ilObjLearningModuleSubItemListGUI\getHTML(), ilObjMediaPoolSubItemListGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilObjWikiSubItemListGUI\getHTML(), ilObjLinkResourceSubItemListGUI\getHTML(), and showDetailsLink().

{
if($a_limited and !self::enabledDetails($this->getObjId()))
{
return array_slice($this->subitem_ids,0,self::$MAX_SUBITEMS);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSubItemListGUI::getType ( )

get type

Returns

Definition at line 156 of file class.ilSubItemListGUI.php.

References $type.

{
return $this->type;
}
ilSubItemListGUI::init (   $item_list_gui,
  $a_ref_id,
  $a_subitem_ids 
)

init

Parameters
@return

Definition at line 190 of file class.ilSubItemListGUI.php.

References $item_list_gui, ilObject\_lookupObjId(), ilObject\_lookupType(), getObjId(), and getRefId().

{
$this->tpl = new ilTemplate('tpl.subitem_list.html',true,true,'Services/Object');
$this->item_list_gui = $item_list_gui;
$this->ref_id = $a_ref_id;
$this->obj_id = ilObject::_lookupObjId($this->getRefId());
$this->type = ilObject::_lookupType($this->getObjId());
$this->subitem_ids = $a_subitem_ids;
}

+ Here is the call graph for this function:

static ilSubItemListGUI::resetDetails ( )
staticfinal

reset details As long as static::resetDetails is not possible this method is final

Returns

Definition at line 86 of file class.ilSubItemListGUI.php.

References $_SESSION.

Referenced by ilLuceneAdvancedSearchGUI\search(), ilLuceneSearchGUI\search(), and ilLuceneSearchGUI\selectRoot().

{
$_SESSION['lucene_search']['details'] = array();
}

+ Here is the caller graph for this function:

ilSubItemListGUI::setHighlighter (   $a_highlighter)

set highlighter

Parameters
@return

Definition at line 119 of file class.ilSubItemListGUI.php.

{
$this->highlighter = $a_highlighter;
}
static ilSubItemListGUI::setShowDetails (   $a_obj_id)
staticfinal

set show details.

Show all subitem links for a specific object As long as static::setShowDetails is not possible this method is final

Returns
Parameters
int$a_obj_idobject id

Definition at line 74 of file class.ilSubItemListGUI.php.

References $_SESSION.

Referenced by ilSearchResultPresentation\__construct().

{
$_SESSION['lucene_search']['details'][$a_obj_id] = true;
}

+ Here is the caller graph for this function:

ilSubItemListGUI::showDetailsLink ( )
protected

show details link

Returns

Definition at line 205 of file class.ilSubItemListGUI.php.

References $ilCtrl, $lng, $MAX_SUBITEMS, getCmdClass(), getObjId(), and getSubItemIds().

Referenced by ilObjForumSubItemListGUI\getHTML(), ilObjLearningModuleSubItemListGUI\getHTML(), ilObjMediaPoolSubItemListGUI\getHTML(), ilObjGlossarySubItemListGUI\getHTML(), ilObjWikiSubItemListGUI\getHTML(), and ilObjLinkResourceSubItemListGUI\getHTML().

{
global $ilCtrl,$lng;
if(count($this->getSubItemIds()) <= self::$MAX_SUBITEMS)
{
return;
}
if(self::enabledDetails($this->getObjId()))
{
return;
}
$additional = count($this->getSubItemIds()) - self::$MAX_SUBITEMS;
$ilCtrl->setParameterByClass(get_class($this->getCmdClass()), 'details', (int) $this->getObjId());
$link = $ilCtrl->getLinkTargetByClass(get_class($this->getCmdClass()),'');
$ilCtrl->clearParametersByClass(get_class($this->getCmdClass()));
$this->tpl->setCurrentBlock('choose_details');
$this->tpl->setVariable('LUC_DETAILS_LINK',$link);
$this->tpl->setVariable('LUC_NUM_HITS',sprintf($lng->txt('lucene_more_hits_link'),$additional));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilSubItemListGUI::$cmdClass = null
protected

Definition at line 40 of file class.ilSubItemListGUI.php.

Referenced by getCmdClass().

ilSubItemListGUI::$details = array()
staticprivate

Definition at line 45 of file class.ilSubItemListGUI.php.

ilSubItemListGUI::$highlighter = null
private

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

Referenced by getHighlighter().

ilSubItemListGUI::$item_list_gui
private

Definition at line 48 of file class.ilSubItemListGUI.php.

Referenced by getItemListGUI(), and init().

ilSubItemListGUI::$MAX_SUBITEMS = 5
staticprotected

Definition at line 38 of file class.ilSubItemListGUI.php.

Referenced by showDetailsLink().

ilSubItemListGUI::$obj_id
private

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

Referenced by getObjId().

ilSubItemListGUI::$ref_id
private

Definition at line 49 of file class.ilSubItemListGUI.php.

Referenced by getRefId().

ilSubItemListGUI::$subitem_ids = array()
private

Definition at line 47 of file class.ilSubItemListGUI.php.

Referenced by getSubItemIds().

ilSubItemListGUI::$tpl
protected

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

ilSubItemListGUI::$type
private

Definition at line 51 of file class.ilSubItemListGUI.php.

Referenced by getType().


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