4include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
 
   52        function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 
   66                $this->id_type = $a_id_type;
 
   67                $this->parent_id = $a_parent_node_id;
 
   72                $this->tabs_gui = $ilTabs;
 
   79                switch($this->id_type)
 
   82                                $this->node_id = $a_id;
 
   85                                $this->access_handler = $ilAccess;
 
   86                                $this->call_by_reference = 
true;  
 
   91                                $this->object_id = $a_id;
 
   93                                $this->access_handler = $ilAccess;
 
   99                                $this->node_id = $a_id;
 
  100                                include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  102                                $this->object_id = $this->tree->lookupObjectId($this->node_id);                         
 
  103                                include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
 
  110                                $this->object_id = $a_id;
 
  111                                include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  113                                include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
 
  119                                $this->object_id = $a_id;
 
  120                                include_once(
'./Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php');
 
  126                                $this->object_id = $a_id;
 
  127                                include_once 
"Services/Object/classes/class.ilDummyAccessHandler.php";
 
  132                $this->ctrl->saveParameter($this, 
$params);
 
  137                if(!$this->object_id)
 
  139                        $this->creation_mode = 
true;
 
  144                        if(!$this->parent_id && $this->tree)
 
  146                                $this->parent_id = $this->tree->getParentId($this->node_id);
 
  157                if (is_object($this->
object))
 
  159                        $this->ctrl->setContext($this->object->getId(), $this->object->getType());
 
  179                $next_class = $this->ctrl->getNextClass($this);
 
  180                $cmd = $this->ctrl->getCmd();
 
  186                        case "ilworkspaceaccessgui";            
 
  189                                        $this->tabs_gui->activateTab(
"id_permissions");
 
  191                                        include_once(
'./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
 
  193                                        $this->ctrl->forwardCommand($wspacc);
 
  202                                return $this->
$cmd();
 
  213                if ($this->object_id != 0)
 
  215                        switch($this->id_type)
 
  251                global $ilLocator, 
$tpl;
 
  253                if ($this->omit_locator)
 
  258                switch($this->id_type)
 
  264                                $ilLocator->addRepositoryItems(
$ref_id);
 
  267                                if (
$_GET[
"admin_mode"] == 
"" &&
 
  268                                        strtolower($this->ctrl->getCmdClass()) == 
"ilobjrolegui")
 
  270                                        $this->ctrl->setParameterByClass(
"ilobjrolegui",
 
  271                                                "rolf_ref_id", 
$_GET[
"rolf_ref_id"]);
 
  272                                        $this->ctrl->setParameterByClass(
"ilobjrolegui",
 
  273                                                "obj_id", 
$_GET[
"obj_id"]);
 
  274                                        $ilLocator->addItem($this->lng->txt(
"role"),
 
  275                                                $this->ctrl->getLinkTargetByClass(array(
"ilpermissiongui",
 
  276                                                        "ilobjrolegui"), 
"perm"));
 
  299        public  function delete()
 
  301                switch($this->id_type)
 
  305                                return parent::deleteObject();
 
  331                        $this->ctrl->redirect($this, 
"");
 
  335                $parent_node = $this->tree->getParentId(
$node_id);
 
  336                $this->ctrl->setParameter($this, 
"wsp_id", $parent_node);
 
  338                include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  340                $cgui->setHeaderText(
$lng->txt(
"info_delete_sure").
"<br/>".
 
  341                        $lng->txt(
"info_delete_warning_no_trash"));
 
  343                $cgui->setFormAction($this->ctrl->getFormAction($this));
 
  344                $cgui->setCancel(
$lng->txt(
"cancel"), 
"cancelDelete");
 
  345                $cgui->setConfirm(
$lng->txt(
"confirm"), 
"confirmedDelete");
 
  350                        $children = $this->tree->getSubTree($this->tree->getNodeData(
$node_id));
 
  351                        foreach($children as $child)
 
  362                                        $this->ctrl->redirect($this);
 
  365                                $cgui->addItem(
"id[]", 
$node_id, $title,
 
  367                                        $lng->txt(
"icon").
" ".
$lng->txt(
"obj_".$type));
 
  371                $tpl->setContent($cgui->getHTML());
 
  379                switch($this->id_type)
 
  383                                return parent::confirmedDeleteObject();
 
  408                        $del_nodes = array();
 
  414                        foreach($del_nodes as 
$node_id => $node)
 
  417                                $this->tree->deleteReference(
$node_id);
 
  420                                        $this->tree->deleteTree($node);
 
  441                $this->ctrl->redirect($this, 
"");
 
  444        public function getHTML() { 
return parent::getHTML(); }
 
  450        final public function setCreationMode($a_mode = 
true) { 
return parent::setCreationMode($a_mode); }
 
  452        final protected function prepareOutput() { 
return parent::prepareOutput(); }
 
  454        final protected function showUpperIcon() { 
return parent::showUpperIcon(); }
 
  456        final protected function omitLocator($a_omit = 
true) { 
return parent::omitLocator($a_omit); }
 
  457        final protected  function getTargetFrame($a_cmd, $a_target_frame = 
"") { 
return parent::getTargetFrame($a_cmd, $a_target_frame); }
 
  458        final protected  function setTargetFrame($a_cmd, $a_target_frame) { 
return parent::setTargetFrame($a_cmd, $a_target_frame); }
 
  459        final public function isVisible() { 
return parent::isVisible(); }
 
  462        final protected function setColumnSettings($column_gui) { 
return parent::setColumnSettings($column_gui); }
 
  463        final protected function checkPermission($a_perm, $a_cmd = 
"") { 
return parent::checkPermission($a_perm, $a_cmd); }
 
  468        final public  function trash() { 
return parent::trashObject(); }                
 
  470        final public function undelete() { 
return parent::undeleteObject(); } 
 
  471        final public function cancelDelete() { 
return parent::cancelDeleteObject(); } 
 
  476        final protected function fillCloneTemplate($a_tpl_varname,$a_type) { 
return parent::fillCloneTemplate($a_tpl_varname,$a_type); }
 
  477        final protected function fillCloneSearchTemplate($a_tpl_varname,$a_type) { 
return parent::fillCloneSearchTemplate($a_tpl_varname,$a_type); }
 
  479        final public function cloneAll() { 
return parent::cloneAllObject(); }
 
  480        final protected function buildCloneSelect($existing_objs) { 
return parent::buildCloneSelect($existing_objs); }
 
  483        final private function displayList() { 
return parent::displayList(); }
 
  493                switch($this->id_type)
 
  497                                return parent::viewObject();
 
  501                                return $this->render();
 
  517                global $ilTabs, 
$lng;
 
  519                switch($this->id_type)
 
  525                                        $ilTabs->addTab(
"id_permissions",
 
  526                                                $lng->txt(
"perm_settings"),
 
  527                                                $this->ctrl->getLinkTargetByClass(array(get_class($this), 
"ilpermissiongui"), 
"perm"));
 
  534                                if ($this->
checkPermissionBool(
"edit_permission") && in_array($this->type, array(
"file", 
"blog")) && $this->node_id)
 
  536                                        $ilTabs->addTab(
"id_permissions",
 
  537                                                $lng->txt(
"wsp_permissions"),
 
  538                                                $this->ctrl->getLinkTargetByClass(array(get_class($this), 
"ilworkspaceaccessgui"), 
"share"));
 
  550        final protected  function getReturnLocation() { die(
"ilObject2GUI::getReturnLocation() is deprecated."); }
 
  551        final protected  function setReturnLocation() { die(
"ilObject2GUI::setReturnLocation() is deprecated."); }
 
  552        final protected function showActions() { die(
"ilObject2GUI::showActions() is deprecated."); }
 
  553        final protected function getTitlesByRefId() { die(
"ilObject2GUI::getTitlesByRefId() is deprecated."); }
 
  554        final protected function getTabs() {nj(); die(
"ilObject2GUI::getTabs() is deprecated."); }
 
  555        final protected function __showButton() { die(
"ilObject2GUI::__showButton() is deprecated."); }
 
  556        final protected function hitsperpageObject() { die(
"ilObject2GUI::hitsperpageObject() is deprecated."); }
 
  557        final protected function __initTableGUI() { die(
"ilObject2GUI::__initTableGUI() is deprecated."); }
 
  587        public function create() { parent::createObject(); }
 
  588        public function save() { parent::saveObject(); }
 
  589        public function edit() { parent::editObject(); }
 
  590        public function update() { parent::updateObject(); }
 
  591        public function cancel() { parent::cancelObject(); }
 
  603                $forms = parent::initCreationForms($a_new_type);
 
  606                if($this->id_type == self::WORKSPACE_NODE_ID)
 
  608                        unset($forms[self::CFORM_CLONE]);
 
  621                parent::importFileObject($this->parent_id);
 
  634                $this->object_id = $a_obj->
getId();
 
  636                if(!$a_parent_node_id)
 
  644                        $a_parent_node_id = (int)
$_REQUEST[
"crtptrefid"];
 
  647                switch($this->id_type)
 
  654                                        $this->node_id = $a_obj->
getRefId();
 
  660                                include_once 
"Services/AccessControl/classes/class.ilRbacLog.php";
 
  661                                $rbac_log_roles = $rbacreview->getParentRoleIds($this->node_id, 
false);
 
  665                                $this->ctrl->setParameter($this, 
"ref_id", $this->node_id);
 
  672                                        $this->node_id = $this->tree->insertObject($a_parent_node_id, $this->object_id);
 
  674                                $this->
getAccessHandler()->setPermissions($a_parent_node_id, $this->node_id);
 
  676                                $this->ctrl->setParameter($this, 
"wsp_id", $this->node_id);
 
  686                require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
  704                $a_callback_ref_id = (int)$a_callback_ref_id;           
 
  705                if($a_callback_ref_id)
 
  708                        $class_name = 
"ilObj".$objDefinition->getClassName($callback_type).
"GUI";
 
  710                        include_once(
$location.
"/class.".$class_name.
".php");
 
  711                        if (in_array(strtolower($class_name), array(
"ilobjitemgroupgui")))
 
  713                                $callback_obj = 
new $class_name($a_callback_ref_id);
 
  717                                $callback_obj = 
new $class_name(
null, $a_callback_ref_id, 
true, 
false);
 
  719                        $callback_obj->afterSaveCallback($a_obj);
 
  736                if($a_perm == 
"create")
 
  744                                return $this->
getAccessHandler()->checkAccess($a_perm.
"_".$a_type, $a_cmd, $a_node_id);
 
  761                if($this->obj_id && $this->object->getOwner() == 
$ilUser->getId())
 
  779                if($this->id_type == self::WORKSPACE_NODE_ID)
 
  781                        if(!$this->creation_mode && $this->object_id)
 
  783                                include_once 
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
 
  787                                $dispatcher->setSubObject($a_sub_type, $a_sub_id);
 
  789                                include_once 
"Services/Object/classes/class.ilObjectListGUI.php";
 
  790                                ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, 
"redrawHeaderAction", 
"", 
true), 
 
  791                                        $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"ilnotegui"), 
"", 
"", 
true, 
false), 
 
  792                                        $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"iltagginggui"), 
"", 
"", 
true, 
false));
 
  794                                $lg = $dispatcher->initHeaderAction();
 
  801                                                $lg->setContainerObject($this);
 
  806                                        $lg->enableNotes(
true);
 
  815                        return parent::initHeaderAction();
 
  824                parent::redrawHeaderActionObject();
 
  829                if($this->id_type == self::WORKSPACE_NODE_ID)
 
  834                include_once(
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
 
  836                $plink->setIncludePermanentLinkText(
false);
 
  837                $plink->setAlignCenter($a_center);
 
  838                return $plink->getHTML();
 
  845                if($this->id_type == self::REPOSITORY_NODE_ID)
 
  847                        parent::handleAutoRating($a_new_obj);
 
const PEAR_ERROR_CALLBACK
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
Class ilCommonActionDispatcherGUI.
Confirmation screen class.
New implementation of ilObjectGUI.
getType()
Functions that must be overwritten.
handleAutoRating(ilObject $a_new_obj)
Activate rating automatically if parent container setting.
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...
deleteConfirmation()
Display delete confirmation form (workspace specific)
const WORKSPACE_OBJECT_ID
getAccessHandler()
Get access handler.
redrawHeaderAction()
Updating icons after ajax call.
& executeCommand()
execute command
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
omitLocator($a_omit=true)
prepareOutput()
prepare output
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)
checkPermission($a_perm, $a_cmd="")
initCreationForms($a_new_type)
Init creation froms.
setTargetFrame($a_cmd, $a_target_frame)
set specific target frame for command
deleteConfirmedObjects()
Delete objects (workspace specific)
getPermanentLinkWidget($a_append=null, $a_center=false)
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
getReturnLocation()
Deprecated functions.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
setColumnSettings($column_gui)
May be overwritten in subclasses.
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)
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.
const REPOSITORY_OBJECT_ID
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static getClassByType($a_obj_type)
Get class by type.
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
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']