Public Member Functions | Data Fields

ilIntLinkRepItemExplorer Class Reference

Inheritance diagram for ilIntLinkRepItemExplorer:
Collaboration diagram for ilIntLinkRepItemExplorer:

Public Member Functions

 ilLMMenuObjectSelector ($a_target)
 Constructor public.
 setSelectableTypes ($a_types)
 setMode ($a_mode)
 setSetLinkTargetScript ($a_script)
 setRefId ($a_ref_id)
 buildLinkTarget ($a_node_id, $a_type)
 get link target (may be overwritten by derived classes)
 buildFrameTarget ($a_type, $a_child=0, $a_obj_id=0)
 get frame target (may be overwritten by derived classes)
 isClickable ($a_type, $a_ref_id)
 return if item is clickable
 buildTitle ($a_title, $a_id, $a_type)
 build item title
 buildDescription ($a_desc, $a_id, $a_type)
 standard implementation for description, may be overwritten by derived classes
 buildOnClick ($a_node_id, $a_type, $a_title)
 get onclick event handling
 showChilds ($a_ref_id)
 determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g.
 formatHeader (&$tpl, $a_obj_id, $a_option)
 overwritten method from base class public

Data Fields

 $mode = "text"

Detailed Description

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


Member Function Documentation

ilIntLinkRepItemExplorer::buildDescription ( a_desc,
a_id,
a_type 
)

standard implementation for description, may be overwritten by derived classes

Reimplemented from ilExplorer.

Definition at line 134 of file class.ilIntLinkRepItemExplorer.php.

        {
                global $ilUser;
                
                if ($ilUser->getPref("ilPageEditor_JavaScript") != "enable")
                {
                        if (in_array($a_type,$this->selectable_types))
                        {
                                if ($this->mode != "link")
                                {
                                        return "[iln ".$a_type."=\"$a_id\"] [/iln]";
                                }
                        }
                }
                return "";
        }

ilIntLinkRepItemExplorer::buildFrameTarget ( a_type,
a_child = 0,
a_obj_id = 0 
)

get frame target (may be overwritten by derived classes)

Reimplemented from ilExplorer.

Definition at line 92 of file class.ilIntLinkRepItemExplorer.php.

        {
                if ($this->mode == "link")
                {
                        return "content";
                }
                else
                {
                        return '';
                }
        }

ilIntLinkRepItemExplorer::buildLinkTarget ( a_node_id,
a_type 
)

get link target (may be overwritten by derived classes)

Reimplemented from ilExplorer.

Definition at line 73 of file class.ilIntLinkRepItemExplorer.php.

References ilUtil::appendUrlParameterString().

        {
                if ($this->mode != "link")
                {
                        return "#";
                }
                else
                {
                        //$tpl->setVariable("LINK_TARGET", "content");
                        $link =
                                ilUtil::appendUrlParameterString($this->link_target_script,
                                "linktype=RepositoryItem".
                                "&linktarget=il__".$a_type."_".$a_node_id);

                        return ($link);
                }
        }

Here is the call graph for this function:

ilIntLinkRepItemExplorer::buildOnClick ( a_node_id,
a_type,
a_title 
)

get onclick event handling

Reimplemented from ilExplorer.

Definition at line 154 of file class.ilIntLinkRepItemExplorer.php.

        {
                return "opener.addInternalLink('[iln ".$a_type."="".$a_node_id.""] [/iln]','".$a_title."');setTimeout('window.close()',300);return(false);";
        }

ilIntLinkRepItemExplorer::buildTitle ( a_title,
a_id,
a_type 
)

build item title

Reimplemented from ilExplorer.

Definition at line 126 of file class.ilIntLinkRepItemExplorer.php.

        {
                return $a_title;
        }

ilIntLinkRepItemExplorer::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.

Definition at line 188 of file class.ilIntLinkRepItemExplorer.php.

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

        {
                global $lng, $ilias;
                
                $tpl->setCurrentBlock("icon");
                $tpl->setVariable("ICON_IMAGE" , ilUtil::getImagePath("icon_root.gif"));
                $tpl->setVariable("TXT_ALT_IMG", $lng->txt("repository"));
                $tpl->parseCurrentBlock();

                $tpl->setCurrentBlock("text");
                $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
                $tpl->parseCurrentBlock();

                //$tpl->setCurrentBlock("row");
                //$tpl->parseCurrentBlock();
                
                $tpl->touchBlock("element");
                
        }

Here is the call graph for this function:

ilIntLinkRepItemExplorer::ilLMMenuObjectSelector ( a_target  ) 

Constructor public.

Parameters:
string scriptname
int user_id

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

References $ilCtrl, ilExplorer::$tree, and ilExplorer::ilExplorer().

        {
                global $tree,$ilCtrl;

                $this->ctrl =& $ilCtrl;
                parent::ilExplorer($a_target);
        }

Here is the call graph for this function:

ilIntLinkRepItemExplorer::isClickable ( a_type,
a_ref_id 
)

return if item is clickable

Reimplemented from ilExplorer.

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

        {
                global $ilUser;
                
                if ($ilUser->getPref("ilPageEditor_JavaScript") != "enable"
                        && $this->mode != "link")
                {
                        return false;
                }
                else
                {
                        return in_array($a_type,$this->selectable_types);
                }
        }

ilIntLinkRepItemExplorer::setMode ( a_mode  ) 

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

        {
                $this->mode  = $a_mode;
        }

ilIntLinkRepItemExplorer::setRefId ( a_ref_id  ) 

Definition at line 68 of file class.ilIntLinkRepItemExplorer.php.

        {
                $this->ref_id = $a_ref_id;
        }

ilIntLinkRepItemExplorer::setSelectableTypes ( a_types  ) 

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

        {
                $this->selectable_types  = $a_types;
        }

ilIntLinkRepItemExplorer::setSetLinkTargetScript ( a_script  ) 

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

        {
                $this->link_target_script = $a_script;
        }

ilIntLinkRepItemExplorer::showChilds ( a_parent_id  ) 

determines wether the childs of an object should be shown or not note: this standard implementation always returns true but it could be overwritten by derived classes (e.g.

ilRepositoryExplorerGUI)

Reimplemented from ilExplorer.

Definition at line 161 of file class.ilIntLinkRepItemExplorer.php.

References $rbacsystem.

        {
                global $rbacsystem;

                if ($a_ref_id == 0)
                {
                        return true;
                }

                if ($rbacsystem->checkAccess("read", $a_ref_id))
                {
                        return true;
                }
                else
                {
                        return false;
                }
        }


Field Documentation

ilIntLinkRepItemExplorer::$mode = "text"

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


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