Public Member Functions | Data Fields

ilObjLinkResourceListGUI Class Reference

Class ilObjLinkResourceListGUI. More...

Inheritance diagram for ilObjLinkResourceListGUI:
Collaboration diagram for ilObjLinkResourceListGUI:

Public Member Functions

 ilObjLinkResourceListGUI ()
 constructor
 getTitle ()
 overwritten from base class
 getDescription ()
 overwritten from base class
 init ()
 initialisation
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="")
 inititialize new item
 getCommandFrame ($a_cmd)
 Get command target frame.
 getProperties ()
 Get item properties.
 getCommandLink ($a_cmd)
 Get command link url.
 __checkDirectLink ()
 Check whether there is only one active link in the web resource.
 __readLink ()
 Get data of first active link resource.

Data Fields

 $single_link = null
 $link_data = array()

Detailed Description

Class ilObjLinkResourceListGUI.

Author:
Alex Killing <alex.killing@gmx.de>
Id:
class.ilObjLinkResourceListGUI.php 14738 2007-09-18 08:14:59Z smeyer

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


Member Function Documentation

ilObjLinkResourceListGUI::__checkDirectLink (  ) 

Check whether there is only one active link in the web resource.

In this case this link is shown in a new browser window

Definition at line 198 of file class.ilObjLinkResourceListGUI.php.

References ilLinkResourceItems::_isSingular().

Referenced by getCommandFrame(), getCommandLink(), getDescription(), and getTitle().

        {
                if(isset($this->single_link[$this->obj_id]))
                {
                        return $this->single_link[$this->obj_id];
                }
                
                include_once './link/classes/class.ilLinkResourceItems.php';
                return $this->single_link[$this->obj_id] = ilLinkResourceItems::_isSingular($this->obj_id);
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjLinkResourceListGUI::__readLink (  ) 

Get data of first active link resource.

Returns:
array link data array

Definition at line 214 of file class.ilObjLinkResourceListGUI.php.

References ilParameterAppender::_append(), ilLinkResourceItems::_getFirstLink(), and ilParameterAppender::_isEnabled().

Referenced by getCommandLink(), getDescription(), and getTitle().

        {
                include_once './link/classes/class.ilLinkResourceItems.php';
                include_once './link/classes/class.ilParameterAppender.php';

                if(ilParameterAppender::_isEnabled())
                {
                        return $this->link_data = ilParameterAppender::_append($tmp =& ilLinkResourceItems::_getFirstLink($this->obj_id));
                }
                return $this->link_data = ilLinkResourceItems::_getFirstLink($this->obj_id);
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObjLinkResourceListGUI::getCommandFrame ( a_cmd  ) 

Get command target frame.

Parameters:
string $a_cmd command
Returns:
string command target frame

Reimplemented from ilObjectListGUI.

Definition at line 120 of file class.ilObjLinkResourceListGUI.php.

References __checkDirectLink(), and ilFrameTargetInfo::_getFrame().

        {
                switch($a_cmd)
                {
                        case "":
                                if($this->__checkDirectLink())
                                {
                                        $frame = '_blank';
                                }
                                else
                                {
                                        $frame = ilFrameTargetInfo::_getFrame("RepositoryContent");
                                }
                                break;

                        default:
                }

                return $frame;
        }

Here is the call graph for this function:

ilObjLinkResourceListGUI::getCommandLink ( a_cmd  ) 

Get command link url.

Parameters:
int $a_ref_id reference id
string $a_cmd command

Reimplemented from ilObjectListGUI.

Definition at line 168 of file class.ilObjLinkResourceListGUI.php.

References __checkDirectLink(), and __readLink().

        {

                // separate method for this line
                switch($a_cmd)
                {
                        case '':
                                if($this->__checkDirectLink())
                                {
                                        $this->__readLink();
                                        $cmd_link = $this->link_data['target'];
                                }
                                else
                                {
                                        $cmd_link = "link/link_resources.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
                                }
                                break;

                        default:
                                $cmd_link = "link/link_resources.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
                }
                return $cmd_link;
        }

Here is the call graph for this function:

ilObjLinkResourceListGUI::getDescription (  ) 

overwritten from base class

Reimplemented from ilObjectListGUI.

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

References __checkDirectLink(), and __readLink().

        {
                if($this->__checkDirectLink())
                {
                        $this->__readLink();
                        
                        return $this->link_data['description'];
                }
                return parent::getDescription();
        }

Here is the call graph for this function:

ilObjLinkResourceListGUI::getProperties (  ) 

Get item properties.

Returns:
array array of property arrays: "alert" (boolean) => display as an alert property (usually in red) "property" (string) => property name "value" (string) => property value

Definition at line 151 of file class.ilObjLinkResourceListGUI.php.

References $lng.

        {
                global $lng, $ilUser;

                $props = array();

                return $props;
        }

ilObjLinkResourceListGUI::getTitle (  ) 

overwritten from base class

Reimplemented from ilObjectListGUI.

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

References __checkDirectLink(), and __readLink().

        {
                if($this->__checkDirectLink())
                {
                        $this->__readLink();
                        
                        return $this->link_data['title'];
                }
                return parent::getTitle();
        }

Here is the call graph for this function:

ilObjLinkResourceListGUI::ilObjLinkResourceListGUI (  ) 

constructor

Definition at line 46 of file class.ilObjLinkResourceListGUI.php.

References ilObjectListGUI::ilObjectListGUI().

        {
                $this->ilObjectListGUI();

        }

Here is the call graph for this function:

ilObjLinkResourceListGUI::init (  ) 

initialisation

Reimplemented from ilObjectListGUI.

Definition at line 82 of file class.ilObjLinkResourceListGUI.php.

References ilObjLinkResourceAccess::_getCommands().

        {
                $this->delete_enabled = true;
                $this->cut_enabled = true;
                $this->subscribe_enabled = true;
                $this->link_enabled = true;
                $this->payment_enabled = false;
                $this->type = "webr";
                $this->gui_class_name = "ilobjlinkresourcegui";
                $this->info_screen_enabled = true;
                
                // general commands array
                include_once('class.ilObjLinkResourceAccess.php');
                $this->commands = ilObjLinkResourceAccess::_getCommands();
        }

Here is the call graph for this function:

ilObjLinkResourceListGUI::initItem ( a_ref_id,
a_obj_id,
a_title = "",
a_description = "" 
)

inititialize new item

Parameters:
int $a_ref_id reference id
int $a_obj_id object id
string $a_title title
string $a_description description

Reimplemented from ilObjectListGUI.

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

        {
                parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
        }


Field Documentation

ilObjLinkResourceListGUI::$link_data = array()

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

ilObjLinkResourceListGUI::$single_link = null

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


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