19require_once 
"./Services/Container/classes/class.ilContainerGUI.php";
 
   20require_once 
"./Modules/Category/classes/class.ilObjCategoryGUI.php";
 
   28    public function __construct($a_data, $a_id, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   33        parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
 
   35        $lng->loadLanguageModule(
"cntr");
 
   36        $lng->loadLanguageModule(
"obj");
 
   54        $this->ctrl->returnToParent($this);
 
   79        $ilHelp->setScreenIdComponent(
"root");
 
   81        $this->ctrl->setParameter($this, 
"ref_id", $this->ref_id);
 
   83        if (
$rbacsystem->checkAccess(
'read', $this->ref_id)) {
 
   84            $this->tabs_gui->addTab(
 
   87                $this->ctrl->getLinkTarget($this, 
"")
 
   91        if (
$rbacsystem->checkAccess(
'write', $this->ref_id)) {
 
   92            $force_active = (
$_GET[
"cmd"] == 
"edit")
 
   95            $this->tabs_gui->addTarget(
 
   97                $this->ctrl->getLinkTarget($this, 
"edit"),
 
  113        $next_class = $this->ctrl->getNextClass($this);
 
  114        $cmd = $this->ctrl->getCmd();
 
  119        switch ($next_class) {
 
  120            case 'ilcontainerlinklistgui':
 
  121                include_once(
"Services/Container/classes/class.ilContainerLinkListGUI.php");
 
  123                $ret =&$this->ctrl->forwardCommand($link_list_gui);
 
  127            case "ilcontainerpagegui":
 
  131                    $this->tpl->setContent(
$ret);
 
  135            case 'ilpermissiongui':
 
  137                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  139                $ret =&$this->ctrl->forwardCommand($perm_gui);
 
  145                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  146                $this->tpl->setVariable(
 
  147                    "LOCATION_CONTENT_STYLESHEET",
 
  153            case 'ilobjectcopygui':
 
  155                include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
  157                $cp->setType(
'root');
 
  158                $this->ctrl->forwardCommand($cp);
 
  161            case "ilobjstylesheetgui":
 
  165            case "ilcommonactiondispatchergui":
 
  166                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  168                $this->ctrl->forwardCommand($gui);
 
  171            case 'ilobjecttranslationgui':
 
  176                include_once(
"./Services/Object/classes/class.ilObjectTranslationGUI.php");
 
  178                $this->ctrl->forwardCommand($transgui);
 
  184                if ($cmd == 
"infoScreen") {
 
  190                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  191                $this->tpl->setVariable(
 
  192                    "LOCATION_CONTENT_STYLESHEET",
 
  215        include_once 
"Services/Object/classes/class.ilObjectListGUI.php";
 
  216        ilObjectListGUI::prepareJSLinks(
 
  218            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"ilnotegui"), 
"", 
"", 
true, 
false),
 
  219            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"iltagginggui"), 
"", 
"", 
true, 
false)
 
  222        $ilTabs->activateTab(
"view_content");
 
  223        $ret =  parent::renderObject();
 
  236        if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
  237            parent::viewObject();
 
  254        parent::setTitleAndDescription();
 
  255        $this->tpl->setDescription(
"");
 
  257            if ($this->object->getTitle() == 
"ILIAS") {
 
  258                $this->tpl->setTitle(
$lng->txt(
"repository"));
 
  260                if ($this->object->getDescription() != 
"") {
 
  261                    $this->tpl->setDescription($this->object->getDescription()); 
 
  269        $this->tabs_gui->addSubTab(
 
  271            $this->lng->txt(
"settings"),
 
  272            $this->ctrl->getLinkTarget($this, 
"edit")
 
  279        $this->tabs_gui->addSubTab(
 
  281            $this->lng->txt(
"obj_multilinguality"),
 
  282            $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui", 
"")
 
  286        $this->tabs_gui->activateTab(
"settings");
 
  287        $this->tabs_gui->activateSubTab($active_tab);
 
  294        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  296        $form->setFormAction($this->ctrl->getFormAction($this));
 
  297        $form->setTitle($this->lng->txt(
"repository"));
 
  305                    ilcontainer::SORT_MANUAL
 
  313        $hide = 
new ilCheckboxInputGUI($this->lng->txt(
"cntr_hide_title_and_icon"), 
"hide_header_icon_and_title");
 
  315        $form->addItem($hide);
 
  318        $form->addCommandButton(
"update", $this->lng->txt(
"save"));
 
  319        $form->addCommandButton(
"addTranslation", $this->lng->txt(
"add_translation"));
 
  339            $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
 
  342            if (
$form->checkInput()) {
 
  347                if ($ilSetting->get(
"custom_icons")) {
 
  348                    if (
$_POST[
"cont_icon_delete"]) {
 
  349                        $this->
object->removeCustomIcon();
 
  351                    $this->
object->saveIcons($_FILES[
"cont_icon"][
'tmp_name']);
 
  356                    $this->object->getId(),
 
  357                    "hide_header_icon_and_title",
 
  358                    $form->getInput(
"hide_header_icon_and_title")
 
  363                require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
  369                $this->ctrl->redirect($this, 
"edit");
 
  374            $form->setValuesByPost();
 
  375            $this->tpl->setContent(
$form->getHTML());
 
  387        $this->ctrl->redirectByClass(
"ilobjecttranslationgui", 
"");
 
  389        $this->lng->loadLanguageModule($this->object->getType());
 
  392        include_once(
"./Services/Object/classes/class.ilObjectTranslationTableGUI.php");
 
  399        if ($a_get_post_values) {
 
  401            foreach (
$_POST[
"title"] as $k => $v) {
 
  402                $vals[] = array(
"title" => $v,
 
  403                    "desc" => 
$_POST[
"desc"][$k],
 
  404                    "lang" => 
$_POST[
"lang"][$k],
 
  405                    "default" => (
$_POST[
"default"] == $k));
 
  409            $data = $this->
object->getTranslations();
 
  410            foreach (
$data[
"Fobject"] as $k => $v) {
 
  411                $data[
"Fobject"][$k][
"default"] = ($k == 
$data[
"default_language"]);
 
  424            $this->
ilias->raiseError($this->lng->txt(
"permission_denied"), $this->ilias->error_obj->MESSAGE);
 
  428        if (!isset(
$_POST[
"default"]) && count(
$_POST[
"lang"]) > 0) {
 
  434        if (array_key_exists(
"", 
$_POST[
"lang"])) {
 
  440        if (count(array_unique(
$_POST[
"lang"])) < count(
$_POST[
"lang"])) {
 
  446        $this->
object->removeTranslations();
 
  448        if (
sizeof(
$_POST[
"title"])) {
 
  449            foreach (
$_POST[
"title"] as $k => $v) {
 
  451                $is_default = (
$_POST[
"default"] == $k);
 
  455                    $this->
object->update();
 
  458                $this->
object->addTranslation(
 
  467            $this->
object->setTitle(
"ILIAS");
 
  468            $this->
object->setDescription(
"");
 
  469            $this->
object->update();
 
  473        $this->ctrl->redirect($this, 
"editTranslations");
 
  481        if (
sizeof(
$_POST[
"title"])) {
 
  482            $k = max(array_keys(
$_POST[
"title"]))+1;
 
  496        foreach (
$_POST[
"title"] as $k => $v) {
 
  497            if (
$_POST[
"check"][$k]) {
 
  498                unset(
$_POST[
"title"][$k]);
 
  499                unset(
$_POST[
"desc"][$k]);
 
  500                unset(
$_POST[
"lang"][$k]);
 
  501                if (
$_POST[
"default"] == $k) {
 
  507        if ($del_default && 
sizeof(
$_POST[
"title"])) {
 
  508            $_POST[
"default"] = array_shift(array_keys(
$_POST[
"title"]));
 
  516    public static function _goto($a_target)
 
An exception for terminatinating execution or to throw for unit testing.
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
& forwardToPageObject()
forward command to page object
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
prepareOutput($a_show_subobjects=true)
prepare output
forwardToStyleSheet()
Forward to style object.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
Class ilContainerLinkListGUI.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
static _importCategories($a_ref_id, $withrol_tmp)
import categories (static, also called by RootFolderGUI)
static _importCategoriesForm($a_ref_id, &$a_tpl)
display form for category import (static, also called by RootFolderGUI)
Class ilObjRootFolderGUI.
importCategoriesFormObject()
import categories form
importCategoriesWithRolObject()
import categories
updateObject()
updates object entry in object_data
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
saveTranslationsObject()
Save title and translations.
static _goto($a_target)
goto target group
getTabs()
common tabs for all container objects (should be called at the end of child getTabs() method
getEditFormValues()
Get values for edit form.
initEditForm()
Init object edit form.
executeCommand()
execute command note: this method is overwritten in all container objects
viewObject()
View root folder.
importCancelledObject()
import cancelled
deleteTranslationsObject()
Remove translation.
setTitleAndDescription()
called by prepare output
setEditTabs($active_tab="settings_misc")
addTranslationObject()
Add a translation.
importCategoriesObject()
import categories
renderObject()
Render root folder.
editTranslationsObject($a_get_post_values=false)
Edit title and translations.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
GUI class for the workflow of copying objects.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
GUI class for object translation handling.
TableGUI class for title/description translations.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
redirection script todo: (a better solution should control the processing via a xml file)
if(empty($password)) $table
if(isset($_POST['submit'])) $form