Public Member Functions

ilObjRecoveryFolderGUI Class Reference

Inheritance diagram for ilObjRecoveryFolderGUI:
Collaboration diagram for ilObjRecoveryFolderGUI:

Public Member Functions

 ilObjRecoveryFolderGUI ($a_data, $a_id, $a_call_by_reference)
 Constructor public.
 saveObject ()
 save object public
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
executeCommand ()
 execute command note: this method is overwritten in all container objects
 showPossibleSubObjects ()
 show possible sub objects selection list

Detailed Description

Definition at line 38 of file class.ilObjRecoveryFolderGUI.php.


Member Function Documentation

& ilObjRecoveryFolderGUI::executeCommand (  ) 

execute command note: this method is overwritten in all container objects

Reimplemented from ilContainerGUI.

Definition at line 122 of file class.ilObjRecoveryFolderGUI.php.

References $cmd, and ilObjectGUI::prepareOutput().

        {
                $next_class = $this->ctrl->getNextClass($this);
                $cmd = $this->ctrl->getCmd();
                $this->prepareOutput();

                switch($next_class)
                {
                        case 'ilpermissiongui':
                                include_once("./classes/class.ilPermissionGUI.php");
                                $perm_gui =& new ilPermissionGUI($this);
                                $ret =& $this->ctrl->forwardCommand($perm_gui);
                                break;

                        default:
                                if(!$cmd)
                                {
                                        $cmd = "view";
                                }
                                $cmd .= "Object";
                                $this->$cmd();

                                break;
                }
                return true;
        }

Here is the call graph for this function:

ilObjRecoveryFolderGUI::ilObjRecoveryFolderGUI ( a_data,
a_id,
a_call_by_reference 
)

Constructor public.

Definition at line 44 of file class.ilObjRecoveryFolderGUI.php.

References ilObjectGUI::ilObjectGUI().

        {
                $this->type = "recf";
                $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
        }

Here is the call graph for this function:

ilObjRecoveryFolderGUI::removeFromSystemObject (  ) 

remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method

public

Reimplemented from ilObjectGUI.

Definition at line 74 of file class.ilObjRecoveryFolderGUI.php.

References $_GET, $_POST, $id, $rbacsystem, ilObjectGUI::removeDeletedNodes(), and sendInfo().

        {
                global $rbacsystem;
                
                // AT LEAST ONE OBJECT HAS TO BE CHOSEN.
                if (!isset($_POST["id"]))
                {
                        $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
                }

                $this->object->notify("removeFromSystem", $_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$_POST["trash_id"]);

                // DELETE THEM
                foreach ($_POST["id"] as $id)
                {
                        // GET COMPLETE NODE_DATA OF ALL SUBTREE NODES
                        $node_data = $this->tree->getNodeData($id);
                        $subtree_nodes = $this->tree->getSubTree($node_data);

                        // remember already checked deleted node_ids
                        $checked[] = $id;

                        // dive in recursive manner in each already deleted subtrees and remove these objects too
                        $this->removeDeletedNodes($id,$checked);

                        foreach ($subtree_nodes as $node)
                        {
                                $node_obj =& $this->ilias->obj_factory->getInstanceByRefId($node["ref_id"]);
                                
                                // this is due to bug #1860 (even if this will not completely fix it)
                                // and the fact, that media pool folders may find their way into
                                // the recovery folder (what results in broken pools, if the are deleted)
                                // Alex, 2006-07-21
                                if ($node_obj->getType() != "fold")
                                {
                                        $node_obj->delete();
                                }
                        }

                        // FIRST DELETE ALL ENTRIES IN RBAC TREE
                        $this->tree->deleteTree($node_data);
                }
                
                sendInfo($this->lng->txt("msg_removed"),true);

                $this->ctrl->redirect($this, "view");
        }

Here is the call graph for this function:

ilObjRecoveryFolderGUI::saveObject (  ) 

save object public

Reimplemented from ilObjectGUI.

Definition at line 54 of file class.ilObjRecoveryFolderGUI.php.

References $rbacadmin, exit, and sendInfo().

        {
                global $rbacadmin;

                // create and insert forum in objecttree
                $newObj = parent::saveObject();

                // setup rolefolder & default local roles
                //$roles = $newObj->initDefaultRoles();

                // ...finally assign role to creator of object
                //$rbacadmin->assignUser($roles[0], $newObj->getOwner(), "y");

                // put here object specific stuff
                        
                // always send a message
                sendInfo($this->lng->txt("object_added"),true);
                exit();
        }

Here is the call graph for this function:

ilObjRecoveryFolderGUI::showPossibleSubObjects (  ) 

show possible sub objects selection list

Reimplemented from ilContainerGUI.

Definition at line 150 of file class.ilObjRecoveryFolderGUI.php.

        {
                $this->sub_objects = "";
        }


The documentation for this class was generated from the following file: