Public Member Functions | Data Fields

ilLMExplorer Class Reference

Inheritance diagram for ilLMExplorer:
Collaboration diagram for ilLMExplorer:

Public Member Functions

 ilLMExplorer ($a_target, &$a_lm_obj)
 Constructor public.
 formatHeader (&$tpl, $a_obj_id, $a_option)
 overwritten method from base class public
 isClickable ($a_type, $a_obj_id=0)
 check if links for certain object type are activated

Data Fields

 $root_id
 $lm_obj
 $output

Detailed Description

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


Member Function Documentation

ilLMExplorer::formatHeader ( &$  tpl,
a_obj_id,
a_option 
)

overwritten method from base class public

Parameters:
integer obj_id
integer array options
Returns:
string

Reimplemented from ilExplorer.

Reimplemented in ilLMEditorExplorer.

Definition at line 75 of file class.ilLMExplorer.php.

References ilExplorer::$ilias, $lng, $tpl, ilExplorer::buildLinkTarget(), ilUtil::getImagePath(), and ilUtil::shortenText().

        {
                global $lng, $ilias;
                
                $tpl->setCurrentBlock("icon");
                $tpl->setVariable("ICON_IMAGE" , ilUtil::getImagePath("icon_lm.gif",false, "output", $this->offlineMode()));
                $tpl->setVariable("TXT_ALT_IMG", $lng->txt("obj_".$this->lm_obj->getType()));
                $tpl->parseCurrentBlock();

                $tpl->setCurrentBlock("link");
                $tpl->setVariable("TITLE", ilUtil::shortenText($this->lm_obj->getTitle(), $this->textwidth, true));
                $tpl->setVariable("LINK_TARGET", $this->buildLinkTarget("",""));
                $tpl->setVariable("TARGET", " target=\"".$this->frame_target."\"");
                $tpl->parseCurrentBlock();
                
                $tpl->touchBlock("element");
        }

Here is the call graph for this function:

ilLMExplorer::ilLMExplorer ( a_target,
&$  a_lm_obj 
)

Constructor public.

Parameters:
string scriptname
int user_id

Definition at line 53 of file class.ilLMExplorer.php.

References ilExplorer::checkPermissions(), ilExplorer::ilExplorer(), ilExplorer::setPostSort(), and ilExplorer::setSessionExpandVariable().

Referenced by ilLMEditorExplorer::ilLMEditorExplorer(), ilLMTOCExplorer::ilLMTOCExplorer(), ilPublicSectionSelector::ilPublicSectionSelector(), and ilTableOfContentsExplorer::ilTableOfContentsExplorer().

        {
                parent::ilExplorer($a_target);
                $this->tree = new ilTree($a_lm_obj->getId());
                $this->tree->setTableNames('lm_tree','lm_data');
                $this->tree->setTreeTablePK("lm_id");
                $this->root_id = $this->tree->readRootId();
                $this->lm_obj =& $a_lm_obj;
                $this->order_column = "";
                $this->setSessionExpandVariable("lmexpand");
                $this->checkPermissions(false);
                $this->setPostSort(false);
                $this->textwidth = 200;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilLMExplorer::isClickable ( a_type,
a_obj_id = 0 
)

check if links for certain object type are activated

Parameters:
string $a_type object type
Returns:
boolean true if linking is activated

Reimplemented from ilExplorer.

Definition at line 100 of file class.ilLMExplorer.php.

References ilLMObject::_isPagePublic().

        {
                global $ilUser;
                // in this standard implementation
                // only the type determines, wether an object should be clickable or not
                // but this method can be overwritten and make use of the ref id
                // (this happens e.g. in class ilRepositoryExplorerGUI)
                if ($this->is_clickable[$a_type] == "n")
                {
                        return false;
                }

                // check public access
                if ($ilUser->getId() == ANONYMOUS_USER_ID and !ilLMObject::_isPagePublic($a_obj_id,true))
                {
                        return false;
                }
        
                return true;
        }

Here is the call graph for this function:


Field Documentation

ilLMExplorer::$lm_obj

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

ilLMExplorer::$output

Reimplemented from ilExplorer.

Reimplemented in ilTableOfContentsExplorer, and ilPublicSectionSelector.

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

ilLMExplorer::$root_id

Reimplemented in ilTableOfContentsExplorer, and ilPublicSectionSelector.

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


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