5include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
 
    6include_once(
"./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
 
   41    public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 
   46        $this->lng = 
$DIC->language();
 
   47        $this->tabs = 
$DIC->tabs();
 
   48        $this->access = 
$DIC->access();
 
   49        $this->tpl = 
$DIC[
"tpl"];
 
   50        $this->ctrl = 
$DIC->ctrl();
 
   51        $this->locator = 
$DIC[
"ilLocator"];
 
   52        $this->tree = 
$DIC->repositoryTree();
 
   53        $this->
help = $DIC[
"ilHelp"];
 
   54        $this->
error = $DIC[
"ilErr"];
 
   64        $lng->loadLanguageModule(
"itgr");
 
   66        $this->ctrl->saveParameter($this, array(
"ref_id"));
 
   89        $next_class = $this->ctrl->getNextClass($this);
 
   90        $cmd = $this->ctrl->getCmd();
 
   92        switch ($next_class) {
 
   93            case 'ilinfoscreengui':
 
   99            case 'ilpermissiongui':
 
  101                $ilTabs->activateTab(
"perm_settings");
 
  103                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
  105                $ret = $this->ctrl->forwardCommand($perm_gui);
 
  108            case "ilcommonactiondispatchergui":
 
  109                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  111                $this->ctrl->forwardCommand($gui);
 
  115                $cmd = $this->ctrl->getCmd(
"listMaterials");
 
  134        if (is_object($this->
object) && $ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
  135            $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, 
"listMaterials"), 
"", 
$_GET[
"ref_id"]);
 
  141        $forms = array(self::CFORM_NEW => $this->
initCreateForm($a_new_type)
 
  159        $ta->setInfo($this->lng->txt(
"itgr_desc_info"));
 
  164        $cb->setInfo($this->lng->txt(
"itgr_show_title_info"));
 
  168        include_once(
"./Modules/ItemGroup/classes/class.ilItemGroupBehaviour.php");
 
  171        $si->setInfo($this->lng->txt(
"itgr_behaviour_info"));
 
  172        $si->setOptions($options);
 
  173        $cb->addSubItem(
$si);
 
  184        ilUtil::sendSuccess($this->lng->txt(
"object_added"), 
true);
 
  185        $ilCtrl->redirect($this, 
"listMaterials");
 
  203        $ilTabs->activateTab(
"materials");
 
  205        $parent_ref_id = 
$tree->getParentId($this->object->getRefId());
 
  207        include_once 
"Services/Object/classes/class.ilObjectAddNewItemGUI.php";
 
  209        $gui->setDisabledObjectTypes(array(
"itgr", 
"sess"));
 
  210        $gui->setAfterCreationCallback($this->object->getRefId());
 
  213        include_once(
"./Modules/ItemGroup/classes/class.ilItemGroupItemsTableGUI.php");
 
  227        include_once 
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
 
  230        $items = is_array(
$_POST[
'items'])
 
  234        $item_group_items->setItems($items);
 
  235        $item_group_items->update();
 
  237        ilUtil::sendSuccess($this->lng->txt(
'msg_obj_modified'), 
true);
 
  238        $ilCtrl->redirect($this, 
"listMaterials");
 
  247        $this->tpl->loadStandardTemplate();
 
  263        $ilHelp->setScreenIdComponent(
"itgr");
 
  265        $parent_ref_id = 
$tree->getParentId($this->object->getRefId());
 
  269        include_once(
"./Services/Link/classes/class.ilLink.php");
 
  270        $ilTabs->setBackTarget(
 
  271            $lng->txt(
'obj_' . $parent_type),
 
  276        if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
  279                $lng->txt(
'itgr_materials'),
 
  280                $this->ctrl->getLinkTarget($this, 
'listMaterials')
 
  285                $lng->txt(
'settings'),
 
  286                $this->ctrl->getLinkTarget($this, 
'edit')
 
  290        if ($ilAccess->checkAccess(
"edit_permission", 
"", $this->object->getRefId())) {
 
  293                $lng->txt(
'perm_settings'),
 
  294                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm")
 
  303    public static function _goto($a_target)
 
  307        $ilAccess = 
$DIC->access();
 
  312        $targets = explode(
'_', $a_target);
 
  316        if ($ilAccess->checkAccess(
"read", 
"", $par_id)) {
 
  317            include_once(
"./Services/Link/classes/class.ilLink.php");
 
  320        } elseif ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID)) {
 
  322                $lng->txt(
"msg_no_perm_read_item"),
 
  341        $ref_id = $this->
object->getRefId();
 
  344        if ($ilAccess->checkAccess(
"read", 
"", $par_id)) {
 
  345            include_once(
"./Services/Link/classes/class.ilLink.php");
 
  359        include_once 
'./Modules/ItemGroup/classes/class.ilItemGroupItems.php';
 
  361        $items->addItem($a_obj->
getRefId());
 
  372        $a_values[
"show_title"] = !$this->
object->getHideTitle();
 
  373        $a_values[
"behaviour"] = $this->
object->getBehaviour();
 
  383        $this->
object->setHideTitle(!$a_form->
getInput(
"show_title"));
 
  384        include_once(
"./Modules/ItemGroup/classes/class.ilItemGroupBehaviour.php");
 
  385        $behaviour = ($a_form->
getInput(
"show_title"))
 
  388        $this->
object->setBehaviour($behaviour);
 
  399        $form = parent::initCreateForm($a_new_type);
 
  400        $ta = $form->getItemByPostVar(
"desc");
 
  401        $ta->setInfo($this->lng->txt(
"itgr_desc_info"));
 
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static getAll()
Get all behaviours.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
User Interface class for item groups.
getTemplate()
Get standard template.
updateCustom(ilPropertyFormGUI $a_form)
Update (custom part)
afterConstructor()
Initialisation.
initCreationForms($a_new_type)
Init creation froms.
afterSave(ilObject $a_new_object)
After save.
addLocatorItems()
Add session locator.
initEditCustomForm(ilPropertyFormGUI $a_form)
Init edit form, custom part.
static _goto($a_target)
Goto item group.
getEditFormCustomValues(array &$a_values)
Get edit form values (custom part)
initCreateForm($a_new_type)
Init object creation form.
executeCommand()
execute command
saveItemAssignment()
Save material assignment.
afterSaveCallback(ilObject $a_obj)
Custom callback after object is created (in parent containert.
gotoParent()
Goto item group.
listMaterials()
show material assignment
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
New implementation of ilObjectGUI.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Render add new item selector.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
addHeaderAction()
Add header action menu.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a text area property in a property form.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc