133    public function __construct($a_data, $a_id = 0, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
  137        $this->locator = 
$DIC[
"ilLocator"];
 
  138        $this->
user = $DIC->user();
 
  139        $this->access = 
$DIC->access();
 
  141        $this->rbacreview = 
$DIC->rbac()->review();
 
  142        $this->toolbar = 
$DIC->toolbar();
 
  143        $this->rbacsystem = 
$DIC->rbac()->system();
 
  150        $ilTabs = 
$DIC->tabs();
 
  152        $this->
ilias = $DIC[
"ilias"];
 
  157        $this->tabs_gui = $ilTabs;
 
  173        if (!$a_call_by_reference) {
 
  174            $params = array(
"ref_id",
"obj_id");
 
  177        $this->ctrl->saveParameter($this, 
$params);
 
  181        $this->formaction = array();
 
  182        $this->return_location = array();
 
  183        $this->target_frame = array();
 
  185        $this->sub_objects = 
"";
 
  187        $this->
data = $a_data;
 
  189        $this->call_by_reference = $a_call_by_reference;
 
  190        $this->prepare_output = $a_prepare_output;
 
  191        $this->creation_mode = 
false;
 
  193        $this->ref_id = ($this->call_by_reference) ? $this->
id : 
$_GET[
"ref_id"];
 
  194        $this->obj_id = ($this->call_by_reference) ? 
$_GET[
"obj_id"] : $this->
id;
 
  196        if ($this->
id != 0) {
 
  204        if (is_object($this->
object)) {
 
  205            if ($this->call_by_reference && $this->ref_id == 
$_GET[
"ref_id"]) {
 
  206                $this->ctrl->setContext(
 
  207                    $this->object->getId(),
 
  208                    $this->object->getType()
 
  217        if ($a_prepare_output) {
 
  228        $next_class = $this->ctrl->getNextClass($this);
 
  229        $cmd = $this->ctrl->getCmd();
 
  231        switch ($next_class) {
 
  252        return $this->call_by_reference;
 
  263        $this->creation_mode = $a_mode;
 
  271        return $this->creation_mode;
 
  278        if ($this->
id != 0) {
 
  279            if ($this->call_by_reference) {
 
  296        $this->tpl->getStandardTemplate();
 
  298        if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
  323            if ($this->call_by_reference) {
 
  326                $class_name = $this->objDefinition->getClassName($obj_type);
 
  327                $class = strtolower(
"ilObj" . $class_name . 
"GUI");
 
  328                $class_path = $this->ctrl->lookupClassPath($class);
 
  329                include_once($class_path);
 
  330                $class_name = $this->ctrl->getClassForClasspath($class_path);
 
  332                $this->parent_gui_obj = 
new $class_name(
"", 
$_GET[
"ref_id"], 
true, 
false);
 
  334                $this->parent_gui_obj->setCreationMode(
true);
 
  335                $this->parent_gui_obj->setTitleAndDescription();
 
  345            if (
$ilUser->getId() != ANONYMOUS_USER_ID) {
 
  346                require_once(
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
 
  354            require_once 
'./Services/FileUpload/classes/class.ilFileUploadUtil.php';
 
  368        if (!is_object($this->
object)) {
 
  369            if ((
int) $_REQUEST[
"crtptrefid"] > 0) {
 
  376        $this->tpl->setTitle($this->object->getPresentationTitle());
 
  377        $this->tpl->setDescription($this->object->getLongDescription());
 
  379        if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
  383            $this->tpl->setTitleIcon(
 
  385                $this->lng->txt(
"obj_" . $this->object->getType())
 
  389        include_once 
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
 
  391        $lgui->initItem($this->object->getRefId(), $this->object->getId());
 
  392        $this->tpl->setAlertProperties($lgui->getAlertProperties());
 
  406        if (!$this->creation_mode && $this->
object) {
 
  407            include_once 
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
 
  411                $this->object->getType(),
 
  413                $this->object->getId()
 
  416            $dispatcher->setSubObject($a_sub_type, $a_sub_id);
 
  418            include_once 
"Services/Object/classes/class.ilObjectListGUI.php";
 
  419            ilObjectListGUI::prepareJSLinks(
 
  420                $this->ctrl->getLinkTarget($this, 
"redrawHeaderAction", 
"", 
true),
 
  421                $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"ilnotegui"), 
"", 
"", 
true, 
false),
 
  422                $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"iltagginggui"), 
"", 
"", 
true, 
false)
 
  425            $lg = $dispatcher->initHeaderAction();
 
  427            if (is_object(
$lg)) {
 
  430                    $lg->setContainerObject($this);
 
  434                $lg->enableMultiDownload(
true);
 
  438                include_once 
"Services/Notes/classes/class.ilNote.php";
 
  439                if ($ilAccess->checkAccess(
"write", 
"", $this->ref_id) ||
 
  440                    $ilAccess->checkAccess(
"edit_permissions", 
"", $this->ref_id) ||
 
  442                    $lg->enableComments(
true);
 
  445                $lg->enableNotes(
true);
 
  446                $lg->enableTags(
true);
 
  460        if (is_object($a_list_gui)) {
 
  461            $this->tpl->setHeaderActionMenu($a_list_gui->getHeaderAction());
 
  481        echo 
$lg->getHeaderAction();
 
  484        echo 
$tpl->getOnLoadCodeForAsynch();
 
  496        if ($this->object->getRefId() == 
"") {
 
  500        $tpl->setMountWebfolderIcon($this->object->getRefId());
 
  540            $this->tabs_gui->addTarget(
 
  542                $this->ctrl->getLinkTarget($this, 
"view"),
 
  549            $this->tabs_gui->addTarget(
 
  551                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
  557        if (
$tree->getSavedNodeData($this->object->getRefId())) {
 
  558            $this->tabs_gui->addTarget(
 
  560                $this->ctrl->getLinkTarget($this, 
"trash"),
 
  582        if (is_array($a_actions)) {
 
  599        if (is_array($a_sub_objects)) {
 
  604            $this->sub_objects = 
"";
 
  621        if ($this->omit_locator) {
 
  626        if ($this->call_by_reference) {
 
  632                : $this->object->getRefId();
 
  633            $ilLocator->addRepositoryItems(
$ref_id);
 
  636        if (!$this->creation_mode) {
 
  653        $this->omit_locator = $a_omit;
 
  666        if (
$_GET[
"admin_mode"] == 
"settings") {        
 
  667            $this->ctrl->setParameterByClass(
 
  668                "ilobjsystemfoldergui",
 
  673                $this->lng->txt(
"administration"),
 
  674                $this->ctrl->getLinkTargetByClass(array(
"iladministrationgui", 
"ilobjsystemfoldergui"), 
"")
 
  676            if ($this->
object && ($this->object->getRefId() != SYSTEM_FOLDER_ID && !$a_do_not_add_object)) {
 
  678                    $this->object->getTitle(),
 
  679                    $this->ctrl->getLinkTarget($this, 
"view")
 
  683            $this->ctrl->setParameterByClass(
 
  684                "iladministrationgui",
 
  688            $this->ctrl->setParameterByClass(
 
  689                "iladministrationgui",
 
  696            $this->ctrl->clearParametersByClass(
"iladministrationgui");
 
  697            $ilLocator->addAdministrationItems();
 
  707        if (isset(
$_POST[
"mref_id"])) {
 
  711        include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
 
  715        $this->ctrl->returnToParent($this);
 
  726        $this->ctrl->returnToParent($this);
 
  738        $this->ctrl->returnToParent($this);
 
  751        $new_type = $_REQUEST[
"new_type"];
 
  755        $this->ctrl->saveParameter($this, 
"crtptrefid");
 
  757        $this->ctrl->saveParameter($this, 
"crtcb");
 
  760            $ilErr->raiseError($this->lng->txt(
"permission_denied"), 
$ilErr->MESSAGE);
 
  762            $this->lng->loadLanguageModule($new_type);
 
  763            $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
  768            if (
$_GET[
"cpfl"] && isset($forms[self::CFORM_CLONE])) {
 
  769                $forms = array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);
 
  804        foreach ($a_forms as 
$id => 
$form) {
 
  806                unset($a_forms[
$id]);
 
  811        if (
sizeof($a_forms) == 1) {
 
  812            $form_type = key($a_forms);
 
  813            $a_forms = array_shift($a_forms);
 
  816            if (method_exists($this, 
"getCreationFormTitle")) {
 
  817                $form_title = $this->getCreationFormTitle($form_type);
 
  818                if ($form_title != 
"") {
 
  819                    $a_forms->setTitle($form_title);
 
  822            return $a_forms->getHTML();
 
  824            include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
 
  829            foreach ($a_forms as $form_type => $cf) {
 
  830                $htpl = 
new ilTemplate(
"tpl.creation_acc_head.html", 
true, 
true, 
"Services/Object");
 
  834                if (method_exists($this, 
"getCreationFormTitle")) {
 
  835                    $form_title = $this->getCreationFormTitle($form_type);
 
  838                    $form_title = $cf->getTitle();
 
  842                $htpl->setVariable(
"TITLE", $this->lng->txt(
"option") . 
" " . $cnt . 
": " .
 
  845                $cf->setTitleIcon(
null);
 
  846                $cf->setTableWidth(
"100%");
 
  848                $acc->addItem($htpl->get(), $cf->getHTML());
 
  853            return "<div class='ilCreationFormSection'>" . $acc->getHTML() . 
"</div>";
 
  865        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  867        $form->setTarget(
"_top");
 
  868        $form->setFormAction($this->ctrl->getFormAction($this, 
"save"));
 
  869        $form->setTitle($this->lng->txt($a_new_type . 
"_new"));
 
  875        $ti->setRequired(
true);
 
  886        $form->addCommandButton(
"save", $this->lng->txt($a_new_type . 
"_add"));
 
  887        $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
  901        $lng->loadLanguageModule(
'didactic');
 
  902        $existing_exclusive = 
false;
 
  904        $options[
'dtpl_0'] = array($this->lng->txt(
'didactic_default_type'),
 
  906                $this->lng->txt(
'didactic_default_type_info'),
 
  907                $this->lng->txt(
'objs_' . $this->type)
 
  910        include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
 
  921                        $existing_exclusive = 
true;
 
  931                $this->lng->txt(
'type'),
 
  936                include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
 
  939                $type->setValue($value);
 
  941                if (!in_array($value, array_keys(
$options)) || ($existing_exclusive && $value == 
"dtpl_0")) {
 
  943                    $options[$value] = array($this->lng->txt(
'not_available'));
 
  946                if ($existing_exclusive) {
 
  951                    $type->setValue(
'dtpl_0');
 
  961                    $option->setDisabled(
true);
 
  964                $type->addOption($option);
 
  987        $ilCtrl->redirectByClass(
"ilrepositorygui", 
"frameset");
 
 1001        $new_type = $_REQUEST[
"new_type"];
 
 1005            $ilErr->raiseError($this->lng->txt(
"no_create_permission"), 
$ilErr->MESSAGE);
 
 1008        $this->lng->loadLanguageModule($new_type);
 
 1009        $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
 1012        if (
$form->checkInput()) {
 
 1013            $this->ctrl->setParameter($this, 
"new_type", 
"");
 
 1018            include_once(
$location . 
"/class." . $class_name . 
".php");
 
 1019            $newObj = 
new $class_name();
 
 1020            $newObj->setType($new_type);
 
 1021            $newObj->setTitle(
$form->getInput(
"title"));
 
 1022            $newObj->setDescription(
$form->getInput(
"desc"));
 
 1030                $newObj->applyDidacticTemplate($dtpl);
 
 1037            $args = func_get_args();
 
 1047        $form->setValuesByPost();
 
 1078        if (!$a_parent_node_id) {
 
 1079            $a_parent_node_id = 
$_GET[
"ref_id"];
 
 1083        if ((
int) $_REQUEST[
"crtptrefid"]) {
 
 1084            $a_parent_node_id = (int) $_REQUEST[
"crtptrefid"];
 
 1091        $this->obj_id = $a_obj->
getId();
 
 1092        $this->ref_id = $a_obj->
getRefId();
 
 1095        require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 1100        include_once 
"Services/AccessControl/classes/class.ilRbacLog.php";
 
 1101        $rbac_log_roles = 
$rbacreview->getParentRoleIds($this->ref_id, 
false);
 
 1106        if ($_REQUEST[
"crtcb"]) {
 
 1108            $class_name = 
"ilObj" . 
$objDefinition->getClassName($callback_type) . 
"GUI";
 
 1110            include_once(
$location . 
"/class." . $class_name . 
".php");
 
 1111            if (in_array(strtolower($class_name), array(
"ilobjitemgroupgui"))) {
 
 1112                $callback_obj = 
new $class_name((
int) $_REQUEST[
"crtcb"]);
 
 1115                $callback_obj = 
new $class_name(
null, (
int) $_REQUEST[
"crtcb"], 
true, 
false);
 
 1117            $callback_obj->afterSaveCallback($a_obj);
 
 1129        $this->ctrl->returnToParent($this);
 
 1144            $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"), 
$ilErr->MESSAGE);
 
 1147        $ilTabs->activateTab(
"settings");
 
 1152            $form->setValuesByArray($values);
 
 1175        $lng->loadLanguageModule($this->object->getType());
 
 1177        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1179        $form->setFormAction($this->ctrl->getFormAction($this, 
"update"));
 
 1180        $form->setTitle($this->lng->txt($this->object->getType() . 
"_edit"));
 
 1186        $ti->setRequired(
true);
 
 1187        $form->addItem($ti);
 
 1193        $form->addItem($ta);
 
 1197        $form->addCommandButton(
"update", $this->lng->txt(
"save"));
 
 1219        $values[
"title"] = $this->
object->getTitle();
 
 1220        $values[
"desc"] = $this->
object->getLongDescription();
 
 1244            $ilErr->raiseError($this->lng->txt(
"permission_denied"), 
$ilErr->MESSAGE);
 
 1248        if (
$form->checkInput() &&
 
 1249            $this->validateCustom(
$form)) {
 
 1250            $this->
object->setTitle(
$form->getInput(
"title"));
 
 1251            $this->
object->setDescription(
$form->getInput(
"desc"));
 
 1253            $this->
object->update();
 
 1260        $ilTabs->activateTab(
"settings");
 
 1261        $form->setValuesByPost();
 
 1291        $this->ctrl->redirect($this, 
"edit");
 
 1302        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1304        $form->setTarget(
"_top");
 
 1305        $form->setFormAction($this->ctrl->getFormAction($this, 
"importFile"));
 
 1306        $form->setTitle($this->lng->txt($a_new_type . 
"_import"));
 
 1308        include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
 
 1309        $fi = 
new ilFileInputGUI($this->lng->txt(
"import_file"), 
"importfile");
 
 1310        $fi->setSuffixes(array(
"zip"));
 
 1311        $fi->setRequired(
true);
 
 1312        $form->addItem($fi);
 
 1314        $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
 
 1315        $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
 1330            $parent_id = 
$_GET[
"ref_id"];
 
 1332        $new_type = $_REQUEST[
"new_type"];
 
 1336            $ilErr->raiseError($this->lng->txt(
"no_create_permission"));
 
 1339        $this->lng->loadLanguageModule($new_type);
 
 1340        $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
 1343        if (
$form->checkInput()) {
 
 1347                include_once 
'./Services/Export/classes/class.ilImportContainer.php';
 
 1350                include_once(
"./Services/Export/classes/class.ilImport.php");
 
 1351                $imp = 
new ilImport((
int) $parent_id);
 
 1355                $new_id = $imp->importObject(
 
 1357                    $_FILES[
"importfile"][
"tmp_name"],
 
 1358                    $_FILES[
"importfile"][
"name"],
 
 1362                $this->tmp_import_dir = $imp->getTemporaryImportDir();
 
 1363                if (!$a_catch_errors) {
 
 1367                ilUtil::sendFailure($this->lng->txt(
"obj_import_file_error") . 
" <br />" . $e->getMessage());
 
 1368                $form->setValuesByPost();
 
 1374                $this->ctrl->setParameter($this, 
"new_type", 
"");
 
 1397        $form->setValuesByPost();
 
 1409        $this->ctrl->returnToParent($this);
 
 1422        if ($this->formaction[$a_cmd] != 
"") {
 
 1423            return $this->formaction[$a_cmd];
 
 1425            return $a_formaction;
 
 1439        $this->formaction[$a_cmd] = $a_formaction;
 
 1451        if ($this->return_location[$a_cmd] != 
"") {
 
 1452            return $this->return_location[$a_cmd];
 
 1468        $this->return_location[$a_cmd] = $a_location;
 
 1480        if ($this->target_frame[$a_cmd] != 
"") {
 
 1481            return $this->target_frame[$a_cmd];
 
 1482        } elseif (!empty($a_target_frame)) {
 
 1483            return "target=\"" . $a_target_frame . 
"\"";
 
 1498        $this->target_frame[$a_cmd] = 
"target=\"" . $a_target_frame . 
"\"";
 
 1506        if ($visible && 
$a_type == 
'crs') {
 
 1508            if ($crs_id = 
$tree->checkForParentType($a_ref_id, 
'crs')) {
 
 1513                    if (!$tmp_obj->isActivated()) {
 
 1536            $ilErr->raiseError($this->lng->txt(
"permission_denied"), 
$ilErr->MESSAGE);
 
 1540        require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 1543            $this->object->getType(),
 
 1544            $this->object->getRefId(),
 
 1545            $this->object->getId(),
 
 1550        include_once(
"./Services/Repository/classes/class.ilAdminSubItemsTableGUI.php");
 
 1551        if (!$this->call_by_reference) {
 
 1552            $this->ctrl->setParameter($this, 
"obj_id", $this->obj_id);
 
 1561        $tpl->setContent($itab->getHTML());
 
 1575        if (
$_GET[
"item_ref_id"] != 
"") {
 
 1579        if (is_array(
$_POST[
"id"])) {
 
 1588        include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
 
 1590        if (!$ru->showDeleteConfirmation(
$_POST[
"id"], $a_error)) {
 
 1591            $ilCtrl->returnToParent($this);
 
 1602        if ($this->sub_objects == 
"") {
 
 1610        if (count(
$d) > 0) {
 
 1614                if (
$row[
"max"] > 0) {
 
 1616                    for (
$i=0; 
$i<count($this->
data[
"ctrl"]); 
$i++) {
 
 1617                        if ($this->
data[
"ctrl"][
$i][
"type"] == $row[
"name"]) {
 
 1623                if (
$row[
"max"] == 
"" || $count < 
$row[
"max"]) {
 
 1624                    $subobj[] = 
$row[
"name"];
 
 1629        if (is_array($subobj)) {
 
 1633            $this->tpl->setCurrentBlock(
"add_object");
 
 1634            $this->tpl->setVariable(
"SELECT_OBJTYPE", $opts);
 
 1635            $this->tpl->setVariable(
"BTN_NAME", 
"create");
 
 1636            $this->tpl->setVariable(
"TXT_ADD", $this->lng->txt(
"add"));
 
 1637            $this->tpl->parseCurrentBlock();
 
 1652        die(
"ilObjectGUI::getTemplateFile() is deprecated.");
 
 1672        $ilToolbar->addButton($a_text, $this->ctrl->getLinkTarget($this, $a_cmd), $a_target);
 
 1684        include_once 
"./Services/Table/classes/class.ilTableGUI.php";
 
 1697            case "clipboardObject":
 
 1698                $offset = 
$_GET[
"offset"];
 
 1699                $order = 
$_GET[
"sort_by"];
 
 1700                $direction = 
$_GET[
"sort_order"];
 
 1701                $tbl->disable(
"footer");
 
 1705                $offset = 
$_GET[
"offset"];
 
 1706                $order = 
$_GET[
"sort_by"];
 
 1707                $direction = 
$_GET[
"sort_order"];
 
 1711        $tbl->setOrderColumn($order);
 
 1712        $tbl->setOrderDirection($direction);
 
 1713        $tbl->setOffset($offset);
 
 1715        $tbl->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
 
 1716        $tbl->setData($result_set);
 
 1731        $class_name = $this->objDefinition->getClassName($obj_type);
 
 1732        $class = strtolower(
"ilObj" . $class_name . 
"GUI");
 
 1733        $this->ctrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", $a_ref_id);
 
 1734        $this->ctrl->redirectByClass(array(
"ilrepositorygui", $class), $a_cmd);
 
 1749        include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
 1752        $cp->setTarget(
$_GET[
'ref_id']);
 
 1753        if ($a_tpl_varname) {
 
 1754            $cp->showSourceSearch($a_tpl_varname);
 
 1756            return $cp->showSourceSearch(
null);
 
 1768        include_once(
'./Services/Link/classes/class.ilLink.php');
 
 1769        include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
 
 1774        $new_type = $_REQUEST[
'new_type'];
 
 1776            $ilErr->raiseError($this->lng->txt(
'permission_denied'));
 
 1778        if (!(
int) $_REQUEST[
'clone_source']) {
 
 1783        if (!$this->
checkPermissionBool(
"write", 
"", $new_type, (
int) $_REQUEST[
'clone_source'])) {
 
 1784            $ilErr->raiseError($this->lng->txt(
'permission_denied'));
 
 1790        $wizard_options->saveOwner(
$ilUser->getId());
 
 1791        $wizard_options->saveRoot((
int) $_REQUEST[
'clone_source']);
 
 1794        foreach (
$options as $source_id => $option) {
 
 1795            $wizard_options->addEntry($source_id, $option);
 
 1797        $wizard_options->read();
 
 1800        $new_obj = 
$orig->cloneObject((
int) 
$_GET[
'ref_id'], $copy_id);
 
 1803        $wizard_options->deleteAll();
 
 1817        include_once(
"Services/Block/classes/class.ilColumnGUI.php");
 
 1822        if (
$ilCtrl->getNextClass() != 
"ilcolumngui") {
 
 1824            return $this->getContent();
 
 1833                        $this->
html = 
$ilCtrl->forwardCommand($column_gui);
 
 1839                        $this->
html = 
$ilCtrl->forwardCommand($column_gui);
 
 1843                    return $this->getContent();
 
 1861        include_once(
"Services/Block/classes/class.ilColumnGUI.php");
 
 1870        if (
$ilCtrl->getNextClass() == 
"ilcolumngui" &&
 
 1908            if (!is_int(strpos(
$_SERVER[
"PHP_SELF"], 
"goto.php"))) {
 
 1910                if ($a_perm == 
"create") {
 
 1912                        $a_ref_id = 
$_GET[
"ref_id"];
 
 1917                    if (!is_object($this->
object)) {
 
 1921                        $a_ref_id = $this->
object->getRefId();
 
 1923                    $type = $this->
object->getType();
 
 1928                include_once 
"Services/Object/exceptions/class.ilObjectException.php";
 
 1938                die(
"Permission Denied.");
 
 1956        if ($a_perm == 
"create") {
 
 1958                $a_ref_id = 
$_GET[
"ref_id"];
 
 1960            return $ilAccess->checkAccess($a_perm . 
"_" . 
$a_type, $a_cmd, $a_ref_id);
 
 1963            if (!is_object($this->
object)) {
 
 1967                $a_ref_id = $this->
object->getRefId();
 
 1969            return $ilAccess->checkAccess($a_perm, $a_cmd, $a_ref_id);
 
 1983        $ilAccess = 
$DIC->access();
 
 1987        if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID)) {
 
 1988            $_GET[
"cmd"] = 
"frameset";
 
 1989            $_GET[
"target"] = 
"";
 
 1990            $_GET[
"ref_id"] = ROOT_FOLDER_ID;
 
 1991            $_GET[
"baseClass"] = 
"ilRepositoryGUI";
 
 1992            include(
"ilias.php");
 
 1996        if ($a_raise_error) {
 
 2011        $ilAccess = 
$DIC->access();
 
 2014        $_GET[
"cmd"] = $a_cmd;
 
 2015        $_GET[
"target"] = 
"";
 
 2016        $_GET[
"ref_id"] = $a_ref_id;
 
 2017        $_GET[
"baseClass"] = 
"ilRepositoryGUI";
 
 2018        include(
"ilias.php");
 
 2027        include_once(
"./Services/FileUpload/classes/class.ilFileUploadGUI.php");
 
 2030        $this->tpl->enableDragDropFileUpload($this->ref_id);
 
 2041            method_exists($a_new_obj, 
"setRating")) {
 
 2042            $a_new_obj->setRating(
true);
 
sprintf('%.4f', $callTime)
const PEAR_ERROR_CALLBACK
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
Accordion user interface class.
TableGUI class for sub items listed in repository administration.
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
Column user interface class.
static getScreenMode()
Get Screen Mode for current command.
setRepositoryMode($a_repositorymode)
Set RepositoryMode.
setEnableEdit($a_enableedit)
Set EnableEdit.
static getCmdSide()
Get Column Side of Current Command.
Class ilCommonActionDispatcherGUI.
static _allocateCopyId()
Allocate a copy for further entries.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
static _isActive()
Static getter.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
Base class for ILIAS Exception handling.
static initFileUpload()
Initializes the file upload and loads the needed javascripts and styles.
static isUploadAllowed($a_ref_id, $a_type="")
Determines whether files can be uploaded to the object with the specified reference id.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type)
Are comments activated for object?
GUI class for the workflow of copying objects.
Base exception class for object service.
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.
addDidacticTemplateOptions(array &$a_options)
Add custom templates.
__showButton($a_cmd, $a_text, $a_target='')
confirmedDeleteObject()
confirmed deletion of object -> objects are moved to trash or deleted immediately,...
validateCustom(ilPropertyFormGUI $a_form)
Validate custom values (if not possible with checkInput())
cancelCreation()
cancel create action and go back to repository parent
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
initImportForm($a_new_type)
Init object import form.
afterImport(ilObject $a_new_object)
Post (successful) object import hook.
withReferences()
determines wether objects are referenced or not (got ref ids or not)
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
handleAutoRating(ilObject $a_new_obj)
Activate rating automatically if parent container setting.
getTabs()
get tabs abstract method.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
prepareOutput($a_show_subobjects=true)
prepare output
initCreateForm($a_new_type)
Init object creation form.
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
afterUpdate()
Post (successful) object update hook.
isVisible($a_ref_id, $a_type)
setColumnSettings(ilColumnGUI $column_gui)
May be overwritten in subclasses.
getRightColumnHTML()
Display right column.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
omitLocator($a_omit=true)
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
setSubObjects($a_sub_objects="")
set possible subobjects for this object.
enableDragDropFileUpload()
Enables the file upload into this object by dropping files.
const COPY_WIZARD_NEEDS_PAGE
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
getAdminTabs()
administration tabs show only permissions and trash folder
getTemplateFile($a_cmd, $a_type="")
get a template blockfile format: tpl.
setAdminTabs()
set admin tabs @access public
viewObject()
list childs of current object
cancelObject()
cancel action and go back to previous page @access public
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
getCenterColumnHTML()
Get center column.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
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...
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
insertHeaderAction($a_list_gui)
Insert header action into main template.
getEditFormValues()
Get values for edit form.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
setTargetFrame($a_cmd, $a_target_frame)
set specific target frame for command
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
addHeaderAction()
Add header action menu.
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
standard implementation for tables use 'from' variable use different initial setting of table
createObject()
create new object form
getCreationFormsHTML(array $a_forms)
Get HTML for creation forms (accordion)
setFormAction($a_cmd, $a_formaction)
set specific form action for command
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
setTabs()
set admin tabs @access public
initEditForm()
Init object edit form.
addAdminLocatorItems($a_do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
addExternalEditFormCustom(ilPropertyFormGUI $a_form)
setTitleAndDescription()
called by prepare output
executeCommand()
execute command
cancelDeleteObject()
cancel deletion of object
getTargetFrame($a_cmd, $a_target_frame="")
get target frame for command (command is method name without "Object", e.g.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
setReturnLocation($a_cmd, $a_location)
set specific return location for command
showPossibleSubObjects()
show possible subobjects (pulldown menu)
updateObject()
updates object entry in object_data
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...
setActions($a_actions="")
set possible actions for objects in list.
redrawHeaderActionObject()
Ajax call: redraw action header only.
setCreationMode($a_mode=true)
if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class!...
initCreationForms($a_new_type)
Init creation froms.
deleteObject($a_error=false)
Display deletion confirmation screen.
cloneAllObject()
Clone single (not container object) Method is overwritten in ilContainerGUI.
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
Class ilObject Basic functions for all objects.
getType()
get object type @access public
static hasAutoRating($a_type, $a_ref_id)
Check if auto rating is active for parent group/course.
static _lookupObjId($a_id)
createReference()
creates reference for object
const TITLE_LENGTH
max length of object title
update()
update object in db
static _lookupTitle($a_id)
lookup object title
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
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
This class represents an option in a radio group.
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)
Repository GUI Utilities.
static set($a_var, $a_val)
Set a value.
static clear($a_var)
Unset a value.
static get($a_var)
Get a value.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static infoPanel($a_keep=true)
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
if(!array_key_exists('StateId', $_REQUEST)) $id
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
redirection script todo: (a better solution should control the processing via a xml file)
if(isset($_POST['submit'])) $form
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']