4 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
5 require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
40 public function __construct($a_parent_obj, $a_parent_cmd, $a_user_id,
array $a_data = null)
44 $this->ctrl = $DIC->ctrl();
45 $this->lng = $DIC->language();
46 $this->access = $DIC->access();
47 $this->tree = $DIC->repositoryTree();
48 $this->obj_definition = $DIC[
"objDefinition"];
50 $lng = $DIC->language();
52 $this->user_id = (int) $a_user_id;
53 $this->
setId(
'objownmgmt');
55 parent::__construct($a_parent_obj, $a_parent_cmd);
63 $this->
setRowTemplate(
"tpl.obj_ownership_row.html",
"Services/Object");
79 if (is_array($a_data) &&
sizeof($a_data)) {
80 if (!$this->user_id) {
81 $is_admin = $ilAccess->checkAccess(
"visible",
"", SYSTEM_FOLDER_ID);
84 foreach ($a_data as
$id => $item) {
88 foreach ($refs as $idx => $ref_id) {
90 if (!
$tree->isDeleted($ref_id)) {
92 $readable = $ilAccess->checkAccessOfUser($this->user_id,
"read",
"", $ref_id,
$a_type);
94 $readable = $is_admin;
102 "readable" => $readable);
118 if (!$objDefinition->isPlugin(
$row[
"type"])) {
119 $txt_type =
$lng->txt(
"obj_" .
$row[
"type"]);
121 include_once(
"./Services/Component/classes/class.ilPlugin.php");
125 $this->tpl->setVariable(
"TITLE",
$row[
"title"]);
126 $this->tpl->setVariable(
"ALT_ICON", $txt_type);
128 $this->tpl->setVariable(
"PATH",
$row[
"path"]);
130 if (
$row[
"readable"]) {
131 $this->tpl->setCurrentBlock(
"actions");
133 $this->tpl->parseCurrentBlock();
143 include_once
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
145 $agui->setId($this->
id .
"-" . $a_ref_id);
146 $agui->setListTitle(
$lng->txt(
"actions"));
148 $ilCtrl->setParameter($this->parent_obj,
"ownid", $a_ref_id);
150 include_once
"Services/Link/classes/class.ilLink.php";
163 $ilCtrl->getLinkTarget($this->parent_obj,
"move"),
170 $lng->txt(
"change_owner"),
172 $ilCtrl->getLinkTarget($this->parent_obj,
"changeOwner"),
178 if (!in_array(
$a_type,
array(
"crsr",
"catr",
"grpr")) && $objDefinition->allowExport(
$a_type)) {
182 $ilCtrl->getLinkTarget($this->parent_obj,
"export"),
192 $ilCtrl->getLinkTarget($this->parent_obj,
"delete"),
198 $ilCtrl->setParameter($this->parent_obj,
"ownid",
"");
200 return $agui->getHTML();
209 $path_full =
$tree->getPathFull($a_ref_id);
210 foreach ($path_full as
$data) {
211 if (++
$counter < (count($path_full)-2)) {
214 if ($a_ref_id != $data[
'ref_id']) {
215 $path .=
" » " . $data[
'title'];
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static lookupTxtById($plugin_id, $lang_var)
__construct($a_parent_obj, $a_parent_cmd, $a_user_id, array $a_data=null)
if(!array_key_exists('StateId', $_REQUEST)) $id
static _getAllReferences($a_id)
get all reference ids of object
Table for object role permissions.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
buildActions($a_ref_id, $a_type)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")