Inheritance diagram for ilObjFolderGUI:
Collaboration diagram for ilObjFolderGUI:Public Member Functions | |
| ilObjFolderGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true) | |
| Constructor public. | |
| viewObject () | |
| list childs of current object | |
| & | executeCommand () |
| execute command | |
| setFolderTree ($a_tree) | |
| set tree | |
| createObject () | |
| create new object form | |
| saveObject ($a_parent=0) | |
| save object | |
| getTabs (&$tabs_gui) | |
| common tabs for all container objects (should be called at the end of child getTabs() method | |
| initCourseContentInterface () | |
| cciEditObject () | |
| cciUpdateObject () | |
| cciMoveObject () | |
| initConditionHandlerGUI ($item_id) | |
| chi_updateObject () | |
| chi_deleteObject () | |
| chi_selectorObject () | |
| chi_assignObject () | |
Data Fields | |
| $folder_tree | |
Definition at line 40 of file class.ilObjFolderGUI.php.
| ilObjFolderGUI::cciEditObject | ( | ) |
Definition at line 265 of file class.ilObjFolderGUI.php.
References $rbacsystem, and initCourseContentInterface().
Referenced by chi_assignObject(), chi_deleteObject(), and chi_updateObject().
{
global $rbacsystem;
// CHECK ACCESS
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_edit();
return true;;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjFolderGUI::cciMoveObject | ( | ) |
Definition at line 298 of file class.ilObjFolderGUI.php.
References $rbacsystem, and initCourseContentInterface().
{
global $rbacsystem;
// CHECK ACCESS
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_move();
return true;;
}
Here is the call graph for this function:| ilObjFolderGUI::cciUpdateObject | ( | ) |
Definition at line 282 of file class.ilObjFolderGUI.php.
References $rbacsystem, and initCourseContentInterface().
{
global $rbacsystem;
// CHECK ACCESS
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_update();
return true;;
}
Here is the call graph for this function:| ilObjFolderGUI::chi_assignObject | ( | ) |
Definition at line 369 of file class.ilObjFolderGUI.php.
References $_GET, cciEditObject(), ilObjectGUI::editObject(), and initConditionHandlerGUI().
{
$this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
$this->chi_obj->chi_assign();
if($_GET['item_id'])
{
$this->cciEditObject();
}
else
{
$this->editObject();
}
}
Here is the call graph for this function:| ilObjFolderGUI::chi_deleteObject | ( | ) |
Definition at line 348 of file class.ilObjFolderGUI.php.
References $_GET, cciEditObject(), ilObjectGUI::editObject(), and initConditionHandlerGUI().
{
$this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
$this->chi_obj->chi_delete();
if($_GET['item_id'])
{
$this->cciEditObject();
}
else
{
$this->editObject();
}
}
Here is the call graph for this function:| ilObjFolderGUI::chi_selectorObject | ( | ) |
Definition at line 363 of file class.ilObjFolderGUI.php.
References $_GET, and initConditionHandlerGUI().
{
$this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
$this->chi_obj->chi_selector();
}
Here is the call graph for this function:| ilObjFolderGUI::chi_updateObject | ( | ) |
Definition at line 334 of file class.ilObjFolderGUI.php.
References $_GET, cciEditObject(), ilObjectGUI::editObject(), and initConditionHandlerGUI().
{
$this->initConditionHandlerGUI($_GET['item_id'] ? $_GET['item_id'] : $this->object->getRefId());
$this->chi_obj->chi_update();
if($_GET['item_id'])
{
$this->cciEditObject();
}
else
{
$this->editObject();
}
}
Here is the call graph for this function:| ilObjFolderGUI::createObject | ( | ) |
create new object form
public
Reimplemented from ilObjectGUI.
Definition at line 130 of file class.ilObjFolderGUI.php.
References $_GET, $_POST, $_SESSION, ilObjectGUI::$data, ilObjectGUI::$lng, ilObjectGUI::getFormAction(), ilObjectGUI::getTargetFrame(), ilObjectGUI::getTemplateFile(), ilUtil::prepareFormOutput(), and ilUtil::stripSlashes().
{
global $lng;
$this->lng =& $lng;
$new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
// fill in saved values in case of error
$data = array();
$data["fields"] = array();
$data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
$data["fields"]["desc"] = ilUtil::stripSlashes($_SESSION["error_post_vars"]["Fobject"]["desc"]);
$this->getTemplateFile("edit",$new_type);
foreach ($data["fields"] as $key => $val)
{
$this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
$this->tpl->setVariable(strtoupper($key), $val);
}
$this->tpl->setVariable("FORMACTION", $this->getFormAction("save",$this->ctrl->getFormAction($this)."&new_type=".$new_type));
$this->tpl->setVariable("TXT_HEADER", $this->lng->txt($this->type."_new"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($this->type."_add"));
$this->tpl->setVariable("CMD_SUBMIT", "save");
$this->tpl->setVariable("TARGET", $this->getTargetFrame("save"));
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
}
Here is the call graph for this function:| & ilObjFolderGUI::executeCommand | ( | ) |
execute command
Reimplemented from ilContainerGUI.
Definition at line 80 of file class.ilObjFolderGUI.php.
{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch ($next_class)
{
case "ilconditionhandlerinterface":
include_once './classes/class.ilConditionHandlerInterface.php';
if($_GET['item_id'])
{
$new_gui =& new ilConditionHandlerInterface($this,(int) $_GET['item_id']);
$this->ctrl->saveParameter($this,'item_id',$_GET['item_id']);
$new_gui->setBackButtons(array('edit' => $this->ctrl->getLinkTarget($this,'cciEdit'),
'preconditions' => $this->ctrl->getLinkTargetByClass('ilconditionhandlerinterface',
'listConditions')));
$this->ctrl->forwardCommand($new_gui);
}
else
{
$new_gui =& new ilConditionHandlerInterface($this);
$this->ctrl->forwardCommand($new_gui);
}
break;
default:
if (empty($cmd))
{
$cmd = "view";
}
$cmd .= "Object";
$this->$cmd();
break;
}
}
| ilObjFolderGUI::getTabs | ( | &$ | tabs_gui | ) |
common tabs for all container objects (should be called at the end of child getTabs() method
Reimplemented from ilContainerGUI.
Definition at line 209 of file class.ilObjFolderGUI.php.
References $_SESSION, and $rbacsystem.
{
global $rbacsystem;
$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
if ($rbacsystem->checkAccess('read',$this->ref_id))
{
$tabs_gui->addTarget("view_content",
$this->ctrl->getLinkTarget($this, ""), "", get_class($this));
}
if ($rbacsystem->checkAccess('write',$this->ref_id))
{
$tabs_gui->addTarget("edit_properties",
$this->ctrl->getLinkTarget($this, "edit"), "edit", get_class($this));
}
if ($rbacsystem->checkAccess('edit_permission',$this->ref_id))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTarget($this, "perm"), "perm", get_class($this));
}
// show clipboard in repository
if ($this->ctrl->getTargetScript() == "repository.php" and !empty($_SESSION['il_rep_clipboard']))
{
$tabs_gui->addTarget("clipboard",
$this->ctrl->getLinkTarget($this, "clipboard"), "clipboard", get_class($this));
}
if ($this->ctrl->getTargetScript() == "adm_object.php")
{
$tabs_gui->addTarget("show_owner",
$this->ctrl->getLinkTarget($this, "owner"), "owner", get_class($this));
if ($this->tree->getSavedNodeData($this->ref_id))
{
$tabs_gui->addTarget("trash",
$this->ctrl->getLinkTarget($this, "trash"), "trash", get_class($this));
}
}
}
| ilObjFolderGUI::ilObjFolderGUI | ( | $ | a_data, | |
| $ | a_id = 0, |
|||
| $ | a_call_by_reference = true, |
|||
| $ | a_prepare_output = true | |||
| ) |
Constructor public.
Definition at line 48 of file class.ilObjFolderGUI.php.
References ilContainerGUI::ilContainerGUI().
{
$this->type = "fold";
$this->ilContainerGUI($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
}
Here is the call graph for this function:| ilObjFolderGUI::initConditionHandlerGUI | ( | $ | item_id | ) |
Definition at line 315 of file class.ilObjFolderGUI.php.
References $_GET.
Referenced by chi_assignObject(), chi_deleteObject(), chi_selectorObject(), and chi_updateObject().
{
include_once './classes/class.ilConditionHandlerInterface.php';
if(!is_object($this->chi_obj))
{
if($_GET['item_id'])
{
$this->chi_obj =& new ilConditionHandlerInterface($this,$item_id);
$this->ctrl->saveParameter($this,'item_id',$_GET['item_id']);
}
else
{
$this->chi_obj =& new ilConditionHandlerInterface($this);
}
}
return true;
}
Here is the caller graph for this function:| ilObjFolderGUI::initCourseContentInterface | ( | ) |
Definition at line 254 of file class.ilObjFolderGUI.php.
Referenced by cciEditObject(), cciMoveObject(), cciUpdateObject(), and viewObject().
{
include_once "./course/classes/class.ilCourseContentInterface.php";
$this->cci_obj =& new ilCourseContentInterface($this,$this->object->getRefId());
#aggregate($this,"ilCourseContentInterface");
#$this->cci_init($this,$this->object->getRefId());
}
Here is the caller graph for this function:| ilObjFolderGUI::saveObject | ( | $ | a_parent = 0 |
) |
save object
public
Definition at line 166 of file class.ilObjFolderGUI.php.
References $_GET, $_POST, ilObjectGUI::$lng, ilObjectGUI::getReturnLocation(), ilUtil::redirect(), sendInfo(), ilUtil::stripSlashes(), and ilObjectGUI::withReferences().
{
global $lng;
$this->lng =& $lng;
if ($a_parent == 0)
{
$a_parent = $_GET["ref_id"];
}
// create and insert Folder in grp_tree
include_once("classes/class.ilObjFolder.php");
$folderObj = new ilObjFolder(0,$this->withReferences());
$folderObj->setType($this->type);
$folderObj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
$folderObj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
$folderObj->create();
$this->object =& $folderObj;
if (is_object($this->folder_tree)) // groups gui should call ObjFolderGUI->setFolderTree also
{
$folderObj->setFolderTree($this->folder_tree);
}
else
{
$folderObj->setFolderTree($this->tree);
}
if ($this->withReferences()) // check if this folders use references
{ // note: e.g. folders in media pools don't
$folderObj->createReference();
$folderObj->setPermissions($a_parent);
}
$folderObj->putInTree($a_parent);
sendInfo($this->lng->txt("fold_added"),true);
ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"")));
//ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
}
Here is the call graph for this function:| ilObjFolderGUI::setFolderTree | ( | $ | a_tree | ) |
set tree
Definition at line 120 of file class.ilObjFolderGUI.php.
{
$this->folder_tree =& $a_tree;
}
| ilObjFolderGUI::viewObject | ( | ) |
list childs of current object
public
Reimplemented from ilObjectGUI.
Definition at line 55 of file class.ilObjFolderGUI.php.
References ilObjectGUI::$tree, initCourseContentInterface(), and ilContainerGUI::renderObject().
{
global $tree;
if($this->ctrl->getTargetScript() == "adm_object.php")
{
parent::viewObject();
return true;
}
else if(!$tree->checkForParentType($this->ref_id,'crs'))
{
//$this->ctrl->returnToParent($this);
$this->renderObject();
}
else
{
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_view();
}
return true;
}
Here is the call graph for this function:| ilObjFolderGUI::$folder_tree |
Definition at line 42 of file class.ilObjFolderGUI.php.
1.7.1