Public Member Functions | Data Fields

ilLMTOCExplorer Class Reference

Inheritance diagram for ilLMTOCExplorer:
Collaboration diagram for ilLMTOCExplorer:

Public Member Functions

 ilLMTOCExplorer ($a_target, &$a_lm_obj)
 Constructor public.
 setOfflineMode ($a_offline=true)
 set offline mode
 offlineMode ()
 get offline mode
 setForceOpenPath ($a_path)
 set force open path
 buildTitle ($a_title, $a_id, $a_type)
 standard implementation for title, maybe overwritten by derived classes
 getImage ($a_name)
 get image path (may be overwritten by derived classes)
 buildLinkTarget ($a_node_id, $a_type)
 build link target
 forceExpanded ($a_obj_id)
 force expansion of node
 isVisible ($a_id, $a_type)

Data Fields

 $offline

Detailed Description

Definition at line 35 of file class.ilLMTOCExplorer.php.


Member Function Documentation

ilLMTOCExplorer::buildLinkTarget ( a_node_id,
a_type 
)

build link target

Reimplemented from ilExplorer.

Definition at line 116 of file class.ilLMTOCExplorer.php.

References offlineMode().

        {
                if (!$this->offlineMode())
                {
                        return parent::buildLinkTarget($a_node_id, $a_type);
                }
                else
                {
                        if ($a_node_id < 1)
                        {
                                $a_node_id = $this->tree->getRootId();
                        }
                        if ($a_type != "pg")
                        {
                                $a_node = $this->tree->fetchSuccessorNode($a_node_id, "pg");
                                $a_node_id = $a_node["child"];
                        }
                        if (!$this->lm_obj->cleanFrames())
                        {
                                return "frame_".$a_node_id."_maincontent.html";
                        }
                        else
                        {
                                return "lm_pg_".$a_node_id.".html";
                        }
                }
        }

Here is the call graph for this function:

ilLMTOCExplorer::buildTitle ( a_title,
a_id,
a_type 
)

standard implementation for title, maybe overwritten by derived classes

Reimplemented from ilExplorer.

Definition at line 80 of file class.ilLMTOCExplorer.php.

References ilLMPageObject::_getPresentationTitle(), and ilStructureObject::_getPresentationTitle().

        {
//echo "<br>-$a_title-$a_type-$a_id-";
                if ($a_type == "st")
                {
                        return ilStructureObject::_getPresentationTitle($a_id,
                                $this->lm_obj->isActiveNumbering());
                }

                if ($this->lm_obj->getTOCMode() == "chapters" || $a_type != "pg")
                {
                        return $a_title;
                }
                else
                {
                        if ($a_type == "pg")
                        {
                                return ilLMPageObject::_getPresentationTitle($a_id,
                                        $this->lm_obj->getPageHeader(), $this->lm_obj->isActiveNumbering());
                        }
                }
        }

Here is the call graph for this function:

ilLMTOCExplorer::forceExpanded ( a_obj_id  ) 

force expansion of node

Reimplemented from ilExplorer.

Definition at line 147 of file class.ilLMTOCExplorer.php.

References offlineMode().

        {
                if ($this->offlineMode())
                {
                        return true;
                }
                else
                {
                        if (in_array($a_obj_id, $this->force_open_path))
                        {
                                return true;
                        }
                        return false;
                }
        }

Here is the call graph for this function:

ilLMTOCExplorer::getImage ( a_name  ) 

get image path (may be overwritten by derived classes)

Definition at line 107 of file class.ilLMTOCExplorer.php.

References ilUtil::getImagePath(), and offlineMode().

        {
                return ilUtil::getImagePath($a_name, false, "output", $this->offlineMode());
        }

Here is the call graph for this function:

ilLMTOCExplorer::ilLMTOCExplorer ( a_target,
&$  a_lm_obj 
)

Constructor public.

Parameters:
string scriptname
int user_id

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

References ilLMExplorer::ilLMExplorer().

        {
                $this->offline = false;
                $this->force_open_path = array();
                parent::ilLMExplorer($a_target, $a_lm_obj);
        }

Here is the call graph for this function:

ilLMTOCExplorer::isVisible ( a_id,
a_type 
)

Reimplemented from ilExplorer.

Definition at line 163 of file class.ilLMTOCExplorer.php.

References ilLMObject::_lookupActive().

        {
                if(!ilLMObject::_lookupActive($a_id))
                {
                        return false;
                }
                else
                {
                        return true;
                }
        }

Here is the call graph for this function:

ilLMTOCExplorer::offlineMode (  ) 

get offline mode

Definition at line 63 of file class.ilLMTOCExplorer.php.

Referenced by buildLinkTarget(), forceExpanded(), and getImage().

        {
                return $this->offline;
        }

Here is the caller graph for this function:

ilLMTOCExplorer::setForceOpenPath ( a_path  ) 

set force open path

Definition at line 72 of file class.ilLMTOCExplorer.php.

        {
                $this->force_open_path = $a_path;
        }

ilLMTOCExplorer::setOfflineMode ( a_offline = true  ) 

set offline mode

Definition at line 55 of file class.ilLMTOCExplorer.php.

        {
                $this->offline = $a_offline;
        }


Field Documentation

ilLMTOCExplorer::$offline

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


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