5 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
6 include_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)
44 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
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"]);
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"));
173 $cb->addSubItem(
$si);
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();
238 $ilCtrl->redirect($this,
"listMaterials");
247 $this->tpl->getStandardTemplate();
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();
309 $lng = $DIC->language();
310 $tree = $DIC->repositoryTree();
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';
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"));
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
gotoParent()
Goto item group.
addItem($a_item_ref_id)
Add one item.
addLocatorItems()
Add session locator.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
static _goto($a_target)
Goto item group.
executeCommand()
execute command
New implementation of ilObjectGUI.
afterSave(ilObject $a_new_object)
After save.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
listMaterials()
show material assignment
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
getEditFormCustomValues(array &$a_values)
Get edit form values (custom part)
initEditCustomForm(ilPropertyFormGUI $a_form)
Init edit form, custom part.
initCreateForm($a_new_type)
Init object creation form.
if(isset($_POST['submit'])) $form
afterConstructor()
Initialisation.
static _lookupObjId($a_id)
getTemplate()
Get standard template.
static getAll()
Get all behaviours.
updateCustom(ilPropertyFormGUI $a_form)
Update (custom part)
saveItemAssignment()
Save material assignment.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
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.
User Interface class for item groups.
setRows($a_rows)
Set Rows.
Create new PHPExcel object
obj_idprivate
Render add new item selector.
This class represents a text area property in a property form.
getRefId()
get reference id public
prepareOutput($a_show_subobjects=true)
initCreationForms($a_new_type)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static redirect($a_script)
addHeaderAction()
Add header action menu.
afterSaveCallback(ilObject $a_obj)
Custom callback after object is created (in parent containert.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options