4include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
51 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
60 $ilTabs =
$DIC[
"ilTabs"];
62 $ilAccess =
$DIC[
"ilAccess"];
63 $this->object_service =
$DIC->object();
73 $this->id_type = $a_id_type;
74 $this->parent_id = $a_parent_node_id;
78 $this->tabs_gui = $ilTabs;
86 $this->locator =
$DIC[
"ilLocator"];
87 $this->
user = $DIC->user();
88 $this->access =
$DIC->access();
91 $this->toolbar =
$DIC->toolbar();
95 switch ($this->id_type) {
97 $this->node_id = $a_id;
100 $this->access_handler = $ilAccess;
101 $this->call_by_reference =
true;
102 $params[] =
"ref_id";
106 $this->object_id = $a_id;
108 $this->access_handler = $ilAccess;
109 $params[] =
"obj_id";
114 $this->node_id = $a_id;
115 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
117 $this->object_id = $this->tree->lookupObjectId($this->node_id);
118 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
120 $params[] =
"wsp_id";
125 $this->object_id = $a_id;
126 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
128 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
130 $params[] =
"obj_id";
134 $this->object_id = $a_id;
135 include_once(
'./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
137 $params[] =
"prt_id";
141 $this->object_id = $a_id;
142 include_once
"Services/Object/classes/class.ilDummyAccessHandler.php";
144 $params[] =
"obj_id";
147 $this->ctrl->saveParameter($this, $params);
152 if (!$this->object_id) {
153 $this->creation_mode =
true;
155 if ($this->node_id) {
157 if (!$this->parent_id && $this->tree) {
158 $this->parent_id = $this->tree->getParentId($this->node_id);
169 if (is_object($this->
object)) {
170 $this->ctrl->setContext($this->object->getId(), $this->object->getType());
188 $next_class = $this->ctrl->getNextClass($this);
189 $cmd = $this->ctrl->getCmd();
193 switch ($next_class) {
194 case "ilworkspaceaccessgui":
195 if ($this->node_id) {
196 $this->tabs_gui->activateTab(
"id_permissions");
198 include_once(
'./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
200 $this->ctrl->forwardCommand($wspacc);
209 return $this->$cmd();
220 if ($this->object_id != 0) {
221 switch ($this->id_type) {
258 $ilLocator =
$DIC[
"ilLocator"];
261 if ($this->omit_locator) {
265 switch ($this->id_type) {
270 $ilLocator->addRepositoryItems(
$ref_id);
273 if (
$_GET[
"admin_mode"] ==
"" &&
274 strtolower($this->ctrl->getCmdClass()) ==
"ilobjrolegui") {
275 $this->ctrl->setParameterByClass(
280 $this->ctrl->setParameterByClass(
286 $this->lng->txt(
"role"),
287 $this->ctrl->getLinkTargetByClass(array(
"ilpermissiongui",
288 "ilobjrolegui"),
"perm")
293 if ($this->object_id) {
309 public function delete()
311 switch ($this->id_type) {
314 return parent::deleteObject();
318 return $this->deleteConfirmation();
333 switch ($this->id_type) {
336 return parent::confirmedDeleteObject();
361 if (
sizeof(
$_POST[
"id"])) {
363 $del_nodes = array();
368 foreach ($del_nodes as
$node_id => $node) {
370 $this->tree->deleteReference(
$node_id);
371 if ($this->tree->isInTree(
$node_id)) {
372 $this->tree->deleteTree($node);
385 ilUtil::sendSuccess(
$lng->txt(
"msg_removed"),
true);
390 $this->ctrl->redirect($this,
"");
395 return parent::getHTML();
403 return parent::withReferences();
407 return parent::setCreationMode($a_mode);
411 return parent::getCreationMode();
415 return parent::prepareOutput($a_show_subobjects);
419 return parent::setTitleAndDescription();
423 return parent::showUpperIcon();
427 return parent::omitLocator($a_omit);
431 return parent::getTargetFrame($a_cmd, $a_target_frame);
435 return parent::setTargetFrame($a_cmd, $a_target_frame);
439 return parent::isVisible($a_ref_id,
$a_type);
443 return parent::getCenterColumnHTML();
447 return parent::getRightColumnHTML();
451 return parent::setColumnSettings($column_gui);
455 return parent::checkPermission($a_perm, $a_cmd,
$a_type, $a_ref_id);
461 return parent::showPossibleSubObjects();
466 return parent::trashObject();
471 return parent::undeleteObject();
475 return parent::cancelDeleteObject();
479 return parent::removeFromSystemObject();
483 return parent::redirectToRefId();
489 return parent::fillCloneTemplate($a_tpl_varname,
$a_type);
493 return parent::fillCloneSearchTemplate($a_tpl_varname,
$a_type);
497 return parent::searchCloneSourceObject();
501 return parent::cloneAllObject();
505 return parent::buildCloneSelect($existing_objs);
511 return parent::displayList();
517 return parent::addAdminLocatorItems($a_do_not_add_object);
525 switch ($this->id_type) {
528 return parent::viewObject();
532 return $this->render();
550 $ilTabs =
$DIC[
"ilTabs"];
554 switch ($this->id_type) {
560 $lng->txt(
"perm_settings"),
561 $this->ctrl->getLinkTargetByClass(array(get_class($this),
"ilpermissiongui"),
"perm")
569 if ($this->
checkPermissionBool(
"edit_permission") && in_array($this->type, array(
"file",
"blog")) && $this->node_id) {
572 $lng->txt(
"wsp_permissions"),
573 $this->ctrl->getLinkTargetByClass(array(get_class($this),
"ilworkspaceaccessgui"),
"share")
588 die(
"ilObject2GUI::getReturnLocation() is deprecated.");
592 die(
"ilObject2GUI::setReturnLocation() is deprecated.");
596 die(
"ilObject2GUI::showActions() is deprecated.");
600 die(
"ilObject2GUI::getTabs() is deprecated.");
604 die(
"ilObject2GUI::__showButton() is deprecated.");
608 die(
"ilObject2GUI::hitsperpageObject() is deprecated.");
612 die(
"ilObject2GUI::__initTableGUI() is deprecated.");
616 die(
"ilObject2GUI::__setTableGUIBasicData() is deprecated.");
650 parent::createObject();
654 parent::saveObject();
658 parent::editObject();
662 parent::updateObject();
666 parent::cancelObject();
679 $forms = parent::initCreationForms($a_new_type);
682 if ($this->id_type == self::WORKSPACE_NODE_ID) {
683 unset($forms[self::CFORM_CLONE]);
696 parent::importFileObject($this->parent_id);
713 $this->object_id = $a_obj->
getId();
715 if (!$a_parent_node_id) {
720 if ((
int) $_REQUEST[
"crtptrefid"]) {
721 $a_parent_node_id = (int) $_REQUEST[
"crtptrefid"];
724 switch ($this->id_type) {
727 if (!$this->node_id) {
729 $this->node_id = $a_obj->
getRefId();
735 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
736 $rbac_log_roles =
$rbacreview->getParentRoleIds($this->node_id,
false);
740 $this->ctrl->setParameter($this,
"ref_id", $this->node_id);
745 if (!$this->node_id) {
746 $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
748 $this->
getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
750 $this->ctrl->setParameter($this,
"wsp_id", $this->node_id);
760 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
781 $a_callback_ref_id = (int) $a_callback_ref_id;
782 if ($a_callback_ref_id) {
784 $class_name =
"ilObj" .
$objDefinition->getClassName($callback_type) .
"GUI";
786 include_once(
$location .
"/class." . $class_name .
".php");
787 if (in_array(strtolower($class_name), array(
"ilobjitemgroupgui"))) {
788 $callback_obj =
new $class_name($a_callback_ref_id);
790 $callback_obj =
new $class_name(
null, $a_callback_ref_id,
true,
false);
792 $callback_obj->afterSaveCallback($a_obj);
812 if ($a_perm ==
"create") {
829 if ($this->obj_id && $this->object->getOwner() ==
$ilUser->getId()) {
844 if ($this->id_type == self::WORKSPACE_NODE_ID) {
845 if (!$this->creation_mode && $this->object_id) {
846 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
855 $dispatcher->setSubObject($a_sub_type, $a_sub_id);
857 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
858 ilObjectListGUI::prepareJSLinks(
859 $this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
860 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
861 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false)
864 $lg = $dispatcher->initHeaderAction();
866 if (is_object($lg)) {
869 $lg->setContainerObject($this);
874 $lg->enableNotes(
true);
881 return parent::initHeaderAction();
890 parent::redrawHeaderActionObject();
895 if ($this->id_type == self::WORKSPACE_NODE_ID) {
899 include_once(
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
901 $plink->setIncludePermanentLinkText(
false);
902 $plink->setAlignCenter($a_center);
903 return $plink->getHTML();
913 if ($this->id_type == self::REPOSITORY_NODE_ID) {
914 parent::handleAutoRating($a_new_obj);
const PEAR_ERROR_CALLBACK
An exception for terminatinating execution or to throw for unit testing.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
Column user interface class.
Class ilCommonActionDispatcherGUI.
Manages favourites, currently the interface for other components, needs discussion.
New implementation of ilObjectGUI.
getType()
Functions that must be overwritten.
setReturnLocation($a_cmd, $a_location)
set specific return location for command
setColumnSettings(ilColumnGUI $column_gui)
May be overwritten in subclasses.
executeCommand()
execute command
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
standard implementation for tables use 'from' variable use different initial setting of table
handleAutoRating(ilObject $a_new_obj)
isVisible($a_ref_id, $a_type)
create()
Deleted in ilObject.
setTitleAndDescription()
called by prepare output
const PORTFOLIO_OBJECT_ID
setTabs()
create tabs (repository/workspace switch)
buildCloneSelect($existing_objs)
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
getReturnLocation($a_cmd, $a_location="")
Deprecated functions.
const WORKSPACE_OBJECT_ID
getAccessHandler()
Get access handler.
redrawHeaderAction()
Updating icons after ajax call.
__showButton($a_cmd, $a_text, $a_target='')
prepareOutput($a_show_subobjects=true)
prepare output
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
omitLocator($a_omit=true)
getCenterColumnHTML()
Get center column.
getTargetFrame($a_cmd, $a_target_frame="")
get target frame for command (command is method name without "Object", e.g.
showPossibleSubObjects()
show possible subobjects (pulldown menu)
initCreationForms($a_new_type)
Init creation froms.
setTargetFrame($a_cmd, $a_target_frame)
set specific target frame for command
deleteConfirmedObjects()
Delete objects (workspace specific)
getTabs()
get tabs abstract method.
getPermanentLinkWidget($a_append=null, $a_center=false)
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
getRightColumnHTML()
Display right column.
static handleAfterSaveCallback(ilObject $a_obj, $a_callback_ref_id)
After creation callback.
assignObject()
create object instance as internal property (repository/workspace switch)
setCreationMode($a_mode=true)
if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class!...
view()
view object content (repository/workspace switch)
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getCreationMode()
get creation mode
afterConstructor()
Do anything that should be done after constructor in here.
fillCloneSearchTemplate($a_tpl_varname, $a_type)
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
addLocatorItems()
Functions to be overwritten.
confirmedDelete()
Delete objects (repository/workspace switch)
withReferences()
Final/Private declaration of unchanged parent methods.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
const REPOSITORY_OBJECT_ID
addAdminLocatorItems($a_do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilObjectGUI Basic methods of all Output classes.
Class ilObject Basic functions for all objects.
createReference()
creates reference for object
static _lookupObjectId($a_ref_id)
lookup object id
setPermissions($a_parent_ref)
set permissions of object
getRefId()
get reference id @access public
getId()
get object id @access public
putInTree($a_parent_ref)
maybe this method should be in tree object!?
static _lookupType($a_id, $a_reference=false)
lookup object type
Class for permanent links.
Access handler for portfolio.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Access handler for personal workspace.
Tree handler for personal workspace.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.