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() | |
Class ilObjLinkResourceListGUI.
Definition at line 37 of file class.ilObjLinkResourceListGUI.php.
| 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 197 of file class.ilObjLinkResourceListGUI.php.
References ilLinkResourceItems::_isSingular().
Referenced by getCommandFrame(), getCommandLink(), getDescription(), and getTitle().
{
if($this->single_link !== null)
{
return $this->single_link;
}
include_once './link/classes/class.ilLinkResourceItems.php';
return $this->single_link = 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.
Definition at line 213 of file class.ilObjLinkResourceListGUI.php.
References ilLinkResourceItems::_getFirstLink().
Referenced by getCommandLink(), getDescription(), and getTitle().
{
include_once './link/classes/class.ilLinkResourceItems.php';
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.
| string | $a_cmd command |
Reimplemented from ilObjectListGUI.
Definition at line 119 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.
| int | $a_ref_id reference id | |
| string | $a_cmd command |
Reimplemented from ilObjectListGUI.
Definition at line 167 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.
Definition at line 150 of file class.ilObjLinkResourceListGUI.php.
| 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";
// 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
| 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 106 of file class.ilObjLinkResourceListGUI.php.
{
parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
}
| 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.
1.7.1