Class ilObjLinkResourceListGUI. More...
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 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); }
ilObjLinkResourceListGUI::__readLink | ( | ) |
Get data of first active link resource.
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); }
ilObjLinkResourceListGUI::getCommandFrame | ( | $ | a_cmd | ) |
Get command target frame.
string | $a_cmd command |
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; }
ilObjLinkResourceListGUI::getCommandLink | ( | $ | a_cmd | ) |
Get command link url.
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; }
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(); }
ilObjLinkResourceListGUI::getProperties | ( | ) |
Get item properties.
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(); }
ilObjLinkResourceListGUI::ilObjLinkResourceListGUI | ( | ) |
constructor
Definition at line 46 of file class.ilObjLinkResourceListGUI.php.
References ilObjectListGUI::ilObjectListGUI().
{ $this->ilObjectListGUI(); }
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(); }
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 107 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.