Class ilObjectListGUI. More...
Inheritance diagram for ilObjectListGUI:Public Member Functions | |
| ilObjectListGUI () | |
| constructor | |
| setContainerObject (&$container_obj) | |
| set the container object (e.g categorygui) Used for link, delete ... | |
| init () | |
| initialisation | |
| enableProperties ($a_status) | |
| En/disable properties. | |
| getPropertiesStatus () | |
| enablePreconditions ($a_status) | |
| En/disable preconditions. | |
| getPreconditionsStatus () | |
| enableDescription ($a_status) | |
| En/disable description. | |
| getDescriptionStatus () | |
| enableDelete ($a_status) | |
| En/disable delete. | |
| getDeleteStatus () | |
| enableCut ($a_status) | |
| En/disable cut. | |
| getCutStatus () | |
| enableSubscribe ($a_status) | |
| En/disable subscribe. | |
| getSubscribeStatus () | |
| enablePayment ($a_status) | |
| En/disable payment. | |
| getPaymentStatus () | |
| enableLink ($a_status) | |
| En/disable link. | |
| getLinkStatus () | |
| enablePath ($a_path) | |
| En/disable path. | |
| getPathStatus () | |
| setTitle ($a_title) | |
| getTitle () | |
| getTitle overwritten in class.ilObjLinkResourceList.php | |
| setDescription ($a_description) | |
| getDescription () | |
| getDescription overwritten in class.ilObjLinkResourceList.php | |
| initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="") | |
| inititialize new item (is called by getItemHTML()) | |
| getCommandLink ($a_cmd) | |
| Get command link url. | |
| getCommandFrame ($a_cmd) | |
| Get command target frame. | |
| getProperties ($a_item= '') | |
| Get item properties. | |
| getCommands () | |
| get all current commands for a specific ref id (in the permission context of the current user) | |
| insertTitle () | |
| insert item title | |
| insertDescription () | |
| insert item description | |
| setMode ($a_mode) | |
| set output mode | |
| getMode () | |
| get output mode | |
| setConditionDepth ($a_depth) | |
| set depth for precondition output (stops at level 5) | |
| isMode ($a_mode) | |
| check current output mode | |
| insertProperties ($a_item= '') | |
| insert properties | |
| insertPayment () | |
| insert payment information | |
| insertPreconditions () | |
| insert all missing preconditions | |
| insertCommand ($a_href, $a_text, $a_frame="") | |
| insert command button | |
| insertDeleteCommand () | |
| insert cut command | |
| insertLinkCommand () | |
| insert link command | |
| insertCutCommand () | |
| insert cut command | |
| insertSubscribeCommand () | |
| insert subscribe command | |
| insertCommands () | |
| insert all commands into html code | |
| appendRepositoryFrameParameter ($a_link) | |
| workaround: all links into the repository (from outside) must tell repository to setup the frameset | |
| insertPath () | |
| insert path | |
| adminCommandsIncluded () | |
| returns whether any admin commands (link, delete, cut) are included in the output | |
| getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description) | |
| Get all item information (title, commands, description) in HTML. | |
Data Fields | |
| $ctrl | |
| $description_enabled = true | |
| $preconditions_enabled = true | |
| $properties_enabled = true | |
| $condition_depth = 0 | |
Class ilObjectListGUI.
Important note:
All access checking should be made within $ilAccess and the checkAccess of the ilObj...Access classes. Do not additionally enable or disable any commands within this GUI class or in derived classes, except when the container (e.g. a search result list) generally refuses them.
Definition at line 44 of file class.ilObjectListGUI.php.
| ilObjectListGUI::adminCommandsIncluded | ( | ) |
returns whether any admin commands (link, delete, cut) are included in the output
Definition at line 971 of file class.ilObjectListGUI.php.
{
return $this->adm_commands_included;
}
| ilObjectListGUI::appendRepositoryFrameParameter | ( | $ | a_link | ) |
workaround: all links into the repository (from outside) must tell repository to setup the frameset
Definition at line 922 of file class.ilObjectListGUI.php.
References $script, and ilUtil::appendUrlParameterString().
Referenced by insertCommands(), and insertTitle().
{
$script = substr(strrchr($_SERVER["PHP_SELF"],"/"),1);
if (substr($script,0,14) != "repository.php" &&
is_int(strpos($a_link,"repository.php")))
{
$a_link =
ilUtil::appendUrlParameterString($a_link, "rep_frame=1");
}
return $a_link;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::enableCut | ( | $ | a_status | ) |
En/disable cut.
| bool |
Definition at line 199 of file class.ilObjectListGUI.php.
{
$this->cut_enabled = $a_status;
return;
}
| ilObjectListGUI::enableDelete | ( | $ | a_status | ) |
En/disable delete.
| bool |
Definition at line 177 of file class.ilObjectListGUI.php.
{
$this->delete_enabled = $a_status;
return;
}
| ilObjectListGUI::enableDescription | ( | $ | a_status | ) |
En/disable description.
| bool |
Definition at line 155 of file class.ilObjectListGUI.php.
{
$this->description_enabled = $a_status;
return;
}
| ilObjectListGUI::enableLink | ( | $ | a_status | ) |
En/disable link.
| bool |
Definition at line 262 of file class.ilObjectListGUI.php.
{
$this->link_enabled = $a_status;
return;
}
| ilObjectListGUI::enablePath | ( | $ | a_path | ) |
En/disable path.
| bool |
Definition at line 284 of file class.ilObjectListGUI.php.
{
$this->path_enabled = $a_path;
}
| ilObjectListGUI::enablePayment | ( | $ | a_status | ) |
En/disable payment.
| bool |
Definition at line 241 of file class.ilObjectListGUI.php.
{
$this->payment_enabled = $a_status;
return;
}
| ilObjectListGUI::enablePreconditions | ( | $ | a_status | ) |
En/disable preconditions.
| bool |
Definition at line 133 of file class.ilObjectListGUI.php.
{
$this->preconditions_enabled = $a_status;
return;
}
| ilObjectListGUI::enableProperties | ( | $ | a_status | ) |
En/disable properties.
| bool |
Definition at line 111 of file class.ilObjectListGUI.php.
{
$this->properties_enabled = $a_status;
return;
}
| ilObjectListGUI::enableSubscribe | ( | $ | a_status | ) |
En/disable subscribe.
| bool |
Definition at line 220 of file class.ilObjectListGUI.php.
{
$this->subscribe_enabled = $a_status;
return;
}
| ilObjectListGUI::getCommandFrame | ( | $ | a_cmd | ) |
Get command target frame.
Overwrite this method if link frame is not current frame
| string | $a_cmd command |
Reimplemented in ilObjQuestionPoolListGUI, ilObjTestListGUI, ilObjExerciseListGUI, ilObjFileListGUI, ilObjDlBookListGUI, ilObjFileBasedLMListGUI, ilObjGlossaryListGUI, ilObjLearningModuleListGUI, ilObjMediaPoolListGUI, ilObjSAHSLearningModuleListGUI, ilObjiLincClassroomListGUI, ilObjLinkResourceListGUI, ilObjSurveyListGUI, and ilObjSurveyQuestionPoolListGUI.
Definition at line 391 of file class.ilObjectListGUI.php.
Referenced by getCommands().
{
return "";
}
Here is the caller graph for this function:| ilObjectListGUI::getCommandLink | ( | $ | a_cmd | ) |
Get command link url.
Overwrite this method, if link target is not build by ctrl class (e.g. "lm_presentation.php", "forum.php"). This is the case for all links now, but bringing everything to ilCtrl should be realised in the future.
| string | $a_cmd command |
Reimplemented in ilObjQuestionPoolListGUI, ilObjTestListGUI, ilObjChatListGUI, ilObjCategoryListGUI, ilObjExerciseListGUI, ilObjFolderListGUI, ilObjGroupListGUI, ilObjDlBookListGUI, ilObjFileBasedLMListGUI, ilObjGlossaryListGUI, ilObjLearningModuleListGUI, ilObjMediaPoolListGUI, ilObjSAHSLearningModuleListGUI, ilObjiLincClassroomListGUI, ilObjiLincCourseListGUI, ilObjLinkResourceListGUI, ilObjSurveyListGUI, and ilObjSurveyQuestionPoolListGUI.
Definition at line 370 of file class.ilObjectListGUI.php.
Referenced by getCommands().
{
// don't use ctrl here in the moment
return 'repository.php?ref_id='.$this->ref_id.'&cmd='.$a_cmd;
// separate method for this line
$cmd_link = $this->ctrl->getLinkTargetByClass($this->gui_class_name,
$a_cmd);
return $cmd_link;
}
Here is the caller graph for this function:| ilObjectListGUI::getCommands | ( | ) |
get all current commands for a specific ref id (in the permission context of the current user)
!!!NOTE!!!: Please use getListHTML() if you want to display the item including all commands
!!!NOTE 2!!!: Please do not overwrite this method in derived classes becaus it will get pretty large and much code will be simply copy-and-pasted. Insert smaller object type related method calls instead. (like getCommandLink() or getCommandFrame())
public
| int | $a_ref_id ref id of object |
Reimplemented in ilObjiLincClassroomListGUI.
Definition at line 445 of file class.ilObjectListGUI.php.
References $cmd, $command, $ilAccess, $ilBench, getCommandFrame(), and getCommandLink().
Referenced by insertCommands().
{
global $ilAccess, $ilBench;
$ref_commands = array();
foreach($this->commands as $command)
{
$permission = $command["permission"];
$cmd = $command["cmd"];
$lang_var = $command["lang_var"];
// all access checking should be made within $ilAccess and
// the checkAccess of the ilObj...Access classes
$ilBench->start("ilObjectListGUI", "4110_get_commands_check_access");
$access = $ilAccess->checkAccess($permission, $cmd, $this->ref_id);
$ilBench->stop("ilObjectListGUI", "4110_get_commands_check_access");
if ($access)
{
$cmd_link = $this->getCommandLink($command["cmd"]);
$cmd_frame = $this->getCommandFrame($command["cmd"]);
$access_granted = true;
}
else
{
$access_granted = false;
$info_object = $ilAccess->getInfo();
}
$ref_commands[] = array(
"permission" => $permission,
"cmd" => $cmd,
"link" => $cmd_link,
"frame" => $cmd_frame,
"lang_var" => $lang_var,
"granted" => $access_granted,
"access_info" => $info_object,
"default" => $command["default"]
);
}
return $ref_commands;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::getCutStatus | ( | ) |
| bool |
Definition at line 210 of file class.ilObjectListGUI.php.
{
return $this->cut_enabled;
}
| ilObjectListGUI::getDeleteStatus | ( | ) |
| bool |
Definition at line 189 of file class.ilObjectListGUI.php.
{
return $this->delete_enabled;
}
| ilObjectListGUI::getDescription | ( | ) |
getDescription overwritten in class.ilObjLinkResourceList.php
Reimplemented in ilObjLinkResourceListGUI.
Definition at line 332 of file class.ilObjectListGUI.php.
Referenced by insertDescription().
{
return $this->description;
}
Here is the caller graph for this function:| ilObjectListGUI::getDescriptionStatus | ( | ) |
| bool |
Definition at line 167 of file class.ilObjectListGUI.php.
Referenced by ilObjiLincClassroomListGUI::getListItemHTML(), and getListItemHTML().
{
return $this->description_enabled;
}
Here is the caller graph for this function:| ilObjectListGUI::getLinkStatus | ( | ) |
| bool |
Definition at line 273 of file class.ilObjectListGUI.php.
{
return $this->link_enabled;
}
| ilObjectListGUI::getListItemHTML | ( | $ | a_ref_id, | |
| $ | a_obj_id, | |||
| $ | a_title, | |||
| $ | a_description | |||
| ) |
Get all item information (title, commands, description) in HTML.
public
| int | $a_ref_id item reference id | |
| int | $a_obj_id item object id | |
| int | $a_title item title | |
| int | $a_description item description |
Definition at line 986 of file class.ilObjectListGUI.php.
References $ilAccess, $ilBench, $type, ilObject::_lookupType(), getDescriptionStatus(), getPreconditionsStatus(), getPropertiesStatus(), initItem(), insertCommands(), insertDescription(), insertPath(), insertPayment(), insertPreconditions(), insertProperties(), insertTitle(), and isMode().
{
global $ilAccess, $ilBench;
// this variable stores wheter any admin commands
// are included in the output
$this->adm_commands_included = false;
// only for permformance exploration
$type = ilObject::_lookupType($a_obj_id);
// initialization
$ilBench->start("ilObjectListGUI", "1000_getListHTML_init$type");
$this->tpl =& new ilTemplate ("tpl.container_list_item.html", true, true);
$this->initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
$ilBench->stop("ilObjectListGUI", "1000_getListHTML_init$type");
// visible check
$ilBench->start("ilObjectListGUI", "2000_getListHTML_check_visible");
if (!$ilAccess->checkAccess("visible", "", $a_ref_id, "", $a_obj_id))
{
$ilBench->stop("ilObjectListGUI", "2000_getListHTML_check_visible");
return "";
}
$ilBench->stop("ilObjectListGUI", "2000_getListHTML_check_visible");
// commands
$ilBench->start("ilObjectListGUI", "4000_insert_commands");
$this->insertCommands();
$ilBench->stop("ilObjectListGUI", "4000_insert_commands");
// insert title and describtion
$ilBench->start("ilObjectListGUI", "3000_insert_title_desc");
$this->insertTitle();
if (!$this->isMode(IL_LIST_AS_TRIGGER))
{
if ($this->getDescriptionStatus())
{
$this->insertDescription();
}
}
$ilBench->stop("ilObjectListGUI", "3000_insert_title_desc");
// payment
$ilBench->start("ilObjectListGUI", "5000_insert_pay");
$this->insertPayment();
$ilBench->stop("ilObjectListGUI", "5000_insert_pay");
// properties
$ilBench->start("ilObjectListGUI", "6000_insert_properties$type");
if ($this->getPropertiesStatus())
{
$this->insertProperties();
}
$ilBench->stop("ilObjectListGUI", "6000_insert_properties$type");
// preconditions
$ilBench->start("ilObjectListGUI", "7000_insert_preconditions");
if ($this->getPreconditionsStatus())
{
$this->insertPreconditions();
}
$ilBench->stop("ilObjectListGUI", "7000_insert_preconditions");
// path
$ilBench->start("ilObjectListGUI", "8000_insert_path");
$this->insertPath();
$ilBench->stop("ilObjectListGUI", "8000_insert_path");
return $this->tpl->get();
}
Here is the call graph for this function:| ilObjectListGUI::getMode | ( | ) |
get output mode
Definition at line 556 of file class.ilObjectListGUI.php.
{
return $this->mode;
}
| ilObjectListGUI::getPathStatus | ( | ) |
| bool |
Definition at line 294 of file class.ilObjectListGUI.php.
Referenced by insertPath().
{
return $this->path_enabled;
}
Here is the caller graph for this function:| ilObjectListGUI::getPaymentStatus | ( | ) |
| bool |
Definition at line 252 of file class.ilObjectListGUI.php.
{
return $this->payment_enabled;
}
| ilObjectListGUI::getPreconditionsStatus | ( | ) |
| bool |
Definition at line 145 of file class.ilObjectListGUI.php.
Referenced by getListItemHTML().
{
return $this->preconditions_enabled;
}
Here is the caller graph for this function:| ilObjectListGUI::getProperties | ( | $ | a_item = '' |
) |
Get item properties.
Overwrite this method to add properties at the bottom of the item html
Reimplemented in ilObjiLincClassroomListGUI.
Definition at line 408 of file class.ilObjectListGUI.php.
Referenced by insertProperties().
{
$props = array();
// please list alert properties first
// example (use $lng->txt instead of "Status"/"Offline" strings):
// $props[] = array("alert" => true, "property" => "Status", "value" => "Offline");
// $props[] = array("alert" => false, "property" => ..., "value" => ...);
// ...
return $props;
}
Here is the caller graph for this function:| ilObjectListGUI::getPropertiesStatus | ( | ) |
| bool |
Definition at line 123 of file class.ilObjectListGUI.php.
Referenced by ilObjiLincClassroomListGUI::getListItemHTML(), and getListItemHTML().
{
return $this->properties_enabled;
}
Here is the caller graph for this function:| ilObjectListGUI::getSubscribeStatus | ( | ) |
| bool |
Definition at line 231 of file class.ilObjectListGUI.php.
{
return $this->subscribe_enabled;
}
| ilObjectListGUI::getTitle | ( | ) |
getTitle overwritten in class.ilObjLinkResourceList.php
Reimplemented in ilObjLinkResourceListGUI.
Definition at line 313 of file class.ilObjectListGUI.php.
Referenced by insertTitle().
{
return $this->title;
}
Here is the caller graph for this function:| ilObjectListGUI::ilObjectListGUI | ( | ) |
constructor
Definition at line 57 of file class.ilObjectListGUI.php.
References $ilCtrl, $ilias, $lng, $rbacsystem, and init().
Referenced by ilObjCategoryListGUI::ilObjCategoryListGUI(), ilObjGroupListGUI::ilObjChatListGUI(), ilObjChatListGUI::ilObjChatListGUI(), ilObjCourseListGUI::ilObjCourseListGUI(), ilObjDlBookListGUI::ilObjDlBookListGUI(), ilObjExerciseListGUI::ilObjExerciseListGUI(), ilObjFileBasedLMListGUI::ilObjFileBasedLMListGUI(), ilObjFileListGUI::ilObjFileListGUI(), ilObjFolderListGUI::ilObjFolderListGUI(), ilObjForumListGUI::ilObjForumListGUI(), ilObjGlossaryListGUI::ilObjGlossaryListGUI(), ilObjiLincClassroomListGUI::ilObjiLincClassroomListGUI(), ilObjiLincCourseListGUI::ilObjiLincCourseListGUI(), ilObjLearningModuleListGUI::ilObjLearningModuleListGUI(), ilObjLinkResourceListGUI::ilObjLinkResourceListGUI(), ilObjMediaPoolListGUI::ilObjMediaPoolListGUI(), ilObjQuestionPoolListGUI::ilObjQuestionPoolListGUI(), ilObjSAHSLearningModuleListGUI::ilObjSAHSLearningModuleListGUI(), ilObjSurveyListGUI::ilObjSurveyListGUI(), ilObjSurveyQuestionPoolListGUI::ilObjSurveyQuestionPoolListGUI(), and ilObjTestListGUI::ilObjTestListGUI().
{
global $rbacsystem, $ilCtrl, $lng, $ilias;
$this->rbacsystem = $rbacsystem;
$this->ilias = $ilias;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->mode = IL_LIST_FULL;
$this->path_enabled = false;
//echo "list";
$this->init();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::init | ( | ) |
initialisation
this method should be overwritten by derived classes
Reimplemented in ilObjQuestionPoolListGUI, ilObjTestListGUI, ilObjChatListGUI, ilObjCategoryListGUI, ilObjExerciseListGUI, ilObjFileListGUI, ilObjFolderListGUI, ilObjForumListGUI, ilObjGroupListGUI, ilObjDlBookListGUI, ilObjFileBasedLMListGUI, ilObjGlossaryListGUI, ilObjLearningModuleListGUI, ilObjMediaPoolListGUI, ilObjSAHSLearningModuleListGUI, ilObjCourseListGUI, ilObjiLincClassroomListGUI, ilObjiLincCourseListGUI, ilObjLinkResourceListGUI, ilObjSurveyListGUI, and ilObjSurveyQuestionPoolListGUI.
Definition at line 89 of file class.ilObjectListGUI.php.
References ilObjectAccess::_getCommands().
Referenced by ilObjectListGUI().
{
$this->delete_enabled = true;
$this->cut_enabled = true;
$this->subscribe_enabled = true;
$this->link_enabled = false;
$this->payment_enabled = false;
$this->type = ""; // "cat", "course", ...
$this->gui_class_name = ""; // "ilobjcategorygui", "ilobjcoursegui", ...
// general commands array, e.g.
include_once('class.ilObjectAccess.php');
$this->commands = ilObjectAccess::_getCommands();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::initItem | ( | $ | a_ref_id, | |
| $ | a_obj_id, | |||
| $ | a_title = "", |
|||
| $ | a_description = "" | |||
| ) |
inititialize new item (is called by getItemHTML())
| int | $a_ref_id reference id | |
| int | $a_obj_id object id | |
| string | $a_title title | |
| string | $a_description description |
Reimplemented in ilObjQuestionPoolListGUI, ilObjTestListGUI, ilObjExerciseListGUI, ilObjFileListGUI, ilObjForumListGUI, ilObjDlBookListGUI, ilObjLearningModuleListGUI, ilObjMediaPoolListGUI, ilObjCourseListGUI, ilObjiLincClassroomListGUI, ilObjLinkResourceListGUI, ilObjSurveyListGUI, and ilObjSurveyQuestionPoolListGUI.
Definition at line 345 of file class.ilObjectListGUI.php.
References setDescription(), and setTitle().
Referenced by getListItemHTML().
{
$this->ref_id = $a_ref_id;
$this->obj_id = $a_obj_id;
$this->setTitle($a_title);
$this->setDescription($a_description);
#$this->description = $a_description;
// checks, whether any admin commands are included in the output
$this->adm_commands_included = false;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertCommand | ( | $ | a_href, | |
| $ | a_text, | |||
| $ | a_frame = "" | |||
| ) |
insert command button
private
| string | $a_href link url target | |
| string | $a_text link text | |
| string | $a_frame link frame target |
Definition at line 727 of file class.ilObjectListGUI.php.
Referenced by ilObjiLincClassroomListGUI::insertCommands(), insertCommands(), insertCutCommand(), insertDeleteCommand(), insertLinkCommand(), and insertSubscribeCommand().
{
if ($a_frame != "")
{
$this->tpl->setCurrentBlock("item_frame");
$this->tpl->setVariable("TARGET_COMMAND", $a_frame);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("item_command");
$this->tpl->setVariable("HREF_COMMAND", $a_href);
$this->tpl->setVariable("TXT_COMMAND", $a_text);
$this->tpl->parseCurrentBlock();
}
Here is the caller graph for this function:| ilObjectListGUI::insertCommands | ( | ) |
insert all commands into html code
private
| object | $a_tpl template object | |
| int | $a_ref_id item reference id |
Reimplemented in ilObjiLincClassroomListGUI.
Definition at line 859 of file class.ilObjectListGUI.php.
References $command, appendRepositoryFrameParameter(), getCommands(), insertCommand(), insertCutCommand(), insertDeleteCommand(), insertLinkCommand(), insertSubscribeCommand(), and isMode().
Referenced by getListItemHTML().
{
$this->ctrl->setParameterByClass($this->gui_class_name, "ref_id", $this->ref_id);
$commands = $this->getCommands($this->ref_id, $this->obj_id);
$this->default_command = false;
foreach($commands as $command)
{
if ($command["granted"] == true )
{
if (!$command["default"] === true)
{
// workaround for repository frameset
$command["link"] =
$this->appendRepositoryFrameParameter($command["link"]);
$cmd_link = $command["link"];
$this->insertCommand($cmd_link, $this->lng->txt($command["lang_var"]),
$command["frame"]);
}
else
{
// this is view/show most times and will be linked
// with the item title in insertTitle
$this->default_command = $command;
}
}
}
if (!$this->isMode(IL_LIST_AS_TRIGGER))
{
// delete
if ($this->delete_enabled)
{
$this->insertDeleteCommand();
}
// link
if ($this->link_enabled)
{
$this->insertLinkCommand();
}
// cut
if ($this->cut_enabled)
{
$this->insertCutCommand();
}
// subscribe
if ($this->subscribe_enabled)
{
$this->insertSubscribeCommand();
}
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertCutCommand | ( | ) |
insert cut command
private
| object | $a_tpl template object | |
| int | $a_ref_id item reference id |
Definition at line 791 of file class.ilObjectListGUI.php.
References insertCommand().
Referenced by insertCommands().
{
// if the permission is changed here, it has
// also to be changed in ilContainerGUI, admin command check
if ($this->rbacsystem->checkAccess("delete", $this->ref_id))
{
$this->ctrl->setParameter($this->container_obj, "ref_id",
$this->container_obj->object->getRefId());
$this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->ref_id);
$cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "cut");
$this->insertCommand($cmd_link, $this->lng->txt("move"));
$this->adm_commands_included = true;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertDeleteCommand | ( | ) |
insert cut command
private
| object | $a_tpl template object | |
| int | $a_ref_id item reference id |
Definition at line 749 of file class.ilObjectListGUI.php.
References insertCommand().
Referenced by ilObjiLincClassroomListGUI::insertCommands(), and insertCommands().
{
if ($this->rbacsystem->checkAccess("delete", $this->ref_id))
{
$this->ctrl->setParameter($this->container_obj, "ref_id",
$this->container_obj->object->getRefId());
$this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->ref_id);
$cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "delete");
$this->insertCommand($cmd_link, $this->lng->txt("delete"));
$this->adm_commands_included = true;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertDescription | ( | ) |
insert item description
private
| object | $a_tpl template object | |
| string | $a_desc item description |
Definition at line 534 of file class.ilObjectListGUI.php.
References getDescription().
Referenced by ilObjiLincClassroomListGUI::getListItemHTML(), and getListItemHTML().
{
$this->tpl->setCurrentBlock("item_description");
$this->tpl->setVariable("TXT_DESC", $this->getDescription());
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertLinkCommand | ( | ) |
insert link command
private
| object | $a_tpl template object | |
| int | $a_ref_id item reference id |
Definition at line 769 of file class.ilObjectListGUI.php.
References insertCommand().
Referenced by insertCommands().
{
// if the permission is changed here, it has
// also to be changed in ilContainerGUI, admin command check
if ($this->rbacsystem->checkAccess("delete", $this->ref_id))
{
$this->ctrl->setParameter($this->container_obj, "ref_id",
$this->container_obj->object->getRefId());
$this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->ref_id);
$cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "link");
$this->insertCommand($cmd_link, $this->lng->txt("link"));
$this->adm_commands_included = true;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertPath | ( | ) |
insert path
Definition at line 939 of file class.ilObjectListGUI.php.
References $id, $lng, $path, $tree, ilObject::_lookupObjId(), ilObject::_lookupTitle(), and getPathStatus().
Referenced by getListItemHTML().
{
global $tree, $lng;
if ($this->getPathStatus() != false)
{
$path = $tree->getPathId($this->ref_id);
$sep = false;
unset($path[count($path) - 1]);
unset($path[0]);
foreach ($path as $id)
{
$this->tpl->setCurrentBlock("path_item");
if ($sep)
{
$this->tpl->setVariable("SEPARATOR", " > ");
}
$this->tpl->setVariable("PATH_ITEM",
ilObject::_lookupTitle(ilObject::_lookupObjId($id)));
$this->tpl->parseCurrentBlock();
$sep = true;
}
$this->tpl->setCurrentBlock("path");
$this->tpl->setVariable("TXT_LOCATION", $lng->txt("locator"));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertPayment | ( | ) |
insert payment information
private
Definition at line 651 of file class.ilObjectListGUI.php.
References ilPaymentObject::_isBuyable(), and ilUtil::getImagePath().
Referenced by getListItemHTML().
{
include_once './payment/classes/class.ilPaymentObject.php';
if ($this->payment_enabled)
{
if (ilPaymentObject::_isBuyable($this->ref_id))
{
$this->tpl->setCurrentBlock("payment");
$this->tpl->setVariable("PAYMENT_TYPE_IMG", ilUtil::getImagePath('icon_pays_b.gif'));
$this->tpl->setVariable("PAYMENT_ALT_IMG", $this->lng->txt('payment_system'));
$this->tpl->parseCurrentBlock();
}
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertPreconditions | ( | ) |
insert all missing preconditions
Definition at line 670 of file class.ilObjectListGUI.php.
References $ilAccess, $lng, $objDefinition, ilConditionHandler::_checkCondition(), ilConditionHandler::_getConditionsOfTarget(), and ilObject::_lookupTitle().
Referenced by getListItemHTML().
{
global $ilAccess, $lng, $objDefinition;
include_once("classes/class.ilConditionHandler.php");
$missing_cond_exist = false;
if ($this->condition_depth > 5)
{
return;
}
foreach(ilConditionHandler::_getConditionsOfTarget($this->obj_id) as $condition)
{
if(ilConditionHandler::_checkCondition($condition['id']))
{
continue;
}
$missing_cond_exist = true;
$cond_txt = $lng->txt("condition_".$condition["operator"])." ".
$condition["value"];
// display trigger item
$class = $objDefinition->getClassName($condition["trigger_type"]);
$location = $objDefinition->getLocation($condition["trigger_type"]);
$full_class = "ilObj".$class."ListGUI";
include_once($location."/class.".$full_class.".php");
$item_list_gui = new $full_class($this);
$item_list_gui->setMode(IL_LIST_AS_TRIGGER);
$item_list_gui->setConditionDepth($this->condition_depth + 1);
$trigger_html = $item_list_gui->getListItemHTML($condition['trigger_ref_id'],
$condition['trigger_obj_id'], trim($cond_txt).": ".ilObject::_lookupTitle($condition["trigger_obj_id"]),
"");
$this->tpl->setCurrentBlock("precondition");
//$this->tpl->setVariable("TXT_CONDITION", trim($cond_txt));
$this->tpl->setVariable("TRIGGER_ITEM", $trigger_html);
$this->tpl->parseCurrentBlock();
}
if ($missing_cond_exist)
{
$this->tpl->setCurrentBlock("preconditions");
$this->tpl->setVariable("TXT_PRECONDITIONS", $lng->txt("preconditions"));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertProperties | ( | $ | a_item = '' |
) |
insert properties
private
Definition at line 593 of file class.ilObjectListGUI.php.
References $ilAccess, $lng, and getProperties().
Referenced by ilObjiLincClassroomListGUI::getListItemHTML(), and getListItemHTML().
{
global $ilAccess, $lng;
$props = $this->getProperties($a_item);
// add no item access note in public section
// for items that are visible but not readable
if ($this->ilias->account->getId() == ANONYMOUS_USER_ID)
{
if (!$ilAccess->checkAccess("read", "", $this->ref_id, $this->type, $this->obj_id))
{
$props[] = array("alert" => true,
"value" => $lng->txt("no_access_item_public"),
"newline" => true);
}
}
$cnt = 1;
if (is_array($props) && count($props) > 0)
{
foreach($props as $prop)
{
if ($prop["alert"] == true)
{
$this->tpl->touchBlock("alert_prop");
}
else
{
$this->tpl->touchBlock("std_prop");
}
if ($prop["newline"] == true && $cnt > 1)
{
$this->tpl->touchBlock("newline_prop");
}
if (isset($prop["property"]))
{
$this->tpl->setCurrentBlock("prop_name");
$this->tpl->setVariable("TXT_PROP", $prop["property"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("item_property");
$this->tpl->setVariable("VAL_PROP", $prop["value"]);
$this->tpl->parseCurrentBlock();
$cnt++;
}
$this->tpl->setCurrentBlock("item_properties");
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertSubscribeCommand | ( | ) |
insert subscribe command
private
| object | $a_tpl template object | |
| int | $a_ref_id item reference id |
Definition at line 813 of file class.ilObjectListGUI.php.
References insertCommand().
Referenced by insertCommands().
{
if ($this->ilias->account->getId() != ANONYMOUS_USER_ID)
{
if (!$this->ilias->account->isDesktopItem($this->ref_id, $this->type))
{
if ($this->rbacsystem->checkAccess("read", $this->ref_id)
&& is_object($this->container_obj))
{
$this->ctrl->setParameter($this->container_obj, "ref_id",
$this->container_obj->object->getRefId());
$this->ctrl->setParameter($this->container_obj, "type", $this->type);
$this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->ref_id);
$cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "addToDesk");
$this->insertCommand($cmd_link, $this->lng->txt("to_desktop"));
}
}
else
{
// not so nice, if no container object given, it must
// be personal desktop
if (is_object($this->container_obj))
{
$this->ctrl->setParameter($this->container_obj, "ref_id",
$this->container_obj->object->getRefId());
$this->ctrl->setParameter($this->container_obj, "type", $this->type);
$this->ctrl->setParameter($this->container_obj, "item_ref_id", $this->ref_id);
$cmd_link = $this->ctrl->getLinkTarget($this->container_obj, "removeFromDesk");
$this->insertCommand($cmd_link, $this->lng->txt("unsubscribe"));
}
else
{
$this->insertCommand("usr_personaldesktop.php?cmd=dropItem&".
"type=".$this->type."&id=".$this->ref_id, $this->lng->txt("unsubscribe"));
}
}
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::insertTitle | ( | ) |
insert item title
private
| object | $a_tpl template object | |
| string | $a_title item title |
Definition at line 497 of file class.ilObjectListGUI.php.
References appendRepositoryFrameParameter(), and getTitle().
Referenced by ilObjiLincClassroomListGUI::getListItemHTML(), and getListItemHTML().
{
if (!$this->default_command)
{
$this->tpl->setCurrentBlock("item_title");
$this->tpl->setVariable("TXT_TITLE", $this->getTitle());
$this->tpl->parseCurrentBlock();
}
else
{
if ($this->default_command["frame"] != "")
{
$this->tpl->setCurrentBlock("title_linked_frame");
$this->tpl->setVariable("TARGET_TITLE_LINKED", $this->default_command["frame"]);
$this->tpl->parseCurrentBlock();
}
// workaround for repository frameset
$this->default_command["link"] =
$this->appendRepositoryFrameParameter($this->default_command["link"]);
// the default command is linked with the title
$this->tpl->setCurrentBlock("item_title_linked");
$this->tpl->setVariable("TXT_TITLE_LINKED", $this->getTitle());
$this->tpl->setVariable("HREF_TITLE_LINKED", $this->default_command["link"]);
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjectListGUI::isMode | ( | $ | a_mode | ) |
check current output mode
| string | $a_mode (IL_LIST_FULL | IL_LIST_AS_TRIGGER) |
Definition at line 576 of file class.ilObjectListGUI.php.
Referenced by ilObjiLincClassroomListGUI::getListItemHTML(), getListItemHTML(), ilObjiLincClassroomListGUI::insertCommands(), and insertCommands().
{
if ($a_mode == $this->mode)
{
return true;
}
else
{
return false;
}
}
Here is the caller graph for this function:| ilObjectListGUI::setConditionDepth | ( | $ | a_depth | ) |
set depth for precondition output (stops at level 5)
Definition at line 564 of file class.ilObjectListGUI.php.
{
$this->condition_depth = $a_depth;
}
| ilObjectListGUI::setContainerObject | ( | &$ | container_obj | ) |
set the container object (e.g categorygui) Used for link, delete ...
commands
this method should be overwritten by derived classes
Definition at line 78 of file class.ilObjectListGUI.php.
{
$this->container_obj =& $container_obj;
}
| ilObjectListGUI::setDescription | ( | $ | a_description | ) |
| string | description |
Definition at line 322 of file class.ilObjectListGUI.php.
Referenced by initItem().
{
$this->description = $a_description;
}
Here is the caller graph for this function:| ilObjectListGUI::setMode | ( | $ | a_mode | ) |
set output mode
| string | $a_mode output mode (IL_LIST_FULL | IL_LIST_AS_TRIGGER) |
Definition at line 546 of file class.ilObjectListGUI.php.
{
$this->mode = $a_mode;
}
| ilObjectListGUI::setTitle | ( | $ | a_title | ) |
| string | title |
Definition at line 303 of file class.ilObjectListGUI.php.
Referenced by initItem().
{
$this->title = $a_title;
}
Here is the caller graph for this function:| ilObjectListGUI::$condition_depth = 0 |
Definition at line 50 of file class.ilObjectListGUI.php.
| ilObjectListGUI::$ctrl |
Definition at line 46 of file class.ilObjectListGUI.php.
| ilObjectListGUI::$description_enabled = true |
Definition at line 47 of file class.ilObjectListGUI.php.
| ilObjectListGUI::$preconditions_enabled = true |
Definition at line 48 of file class.ilObjectListGUI.php.
| ilObjectListGUI::$properties_enabled = true |
Definition at line 49 of file class.ilObjectListGUI.php.
1.7.1