4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_once(
"./Services/Component/classes/class.ilPlugin.php");
36 public function __construct($a_ref_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
40 $this->ctrl = $DIC->ctrl();
41 $this->tpl = $DIC[
"tpl"];
42 $this->access = $DIC->access();
43 $this->lng = $DIC->language();
44 $this->nav_history = $DIC[
"ilNavigationHistory"];
45 $this->tabs = $DIC->tabs();
46 $this->locator = $DIC[
"ilLocator"];
47 $this->plugin_admin = $DIC[
"ilPluginAdmin"];
48 $this->
user = $DIC->user();
49 parent::__construct($a_ref_id, $a_id_type, $a_parent_node_id);
66 $tpl->getStandardTemplate();
74 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui") {
84 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
85 $ilNavigationHistory->addItem(
87 $ilCtrl->getLinkTarget($this, $this->getStandardCmd()),
101 $next_class = $this->ctrl->getNextClass($this);
102 $cmd = $this->ctrl->getCmd();
104 switch ($next_class) {
105 case "ilinfoscreengui":
110 case 'ilpermissiongui':
111 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
113 $ilTabs->setTabActive(
"perm_settings");
114 $ilCtrl->forwardCommand($perm_gui);
117 case 'ilobjectcopygui':
118 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
120 $cp->setType($this->
getType());
121 $this->ctrl->forwardCommand($cp);
126 include_once
'./Services/Export/classes/class.ilExportGUI.php';
128 $exp->addFormat(
'xml');
129 $this->ctrl->forwardCommand($exp);
132 case 'illearningprogressgui':
133 $ilTabs->setTabActive(
"learning_progress");
134 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
137 $this->
object->getRefId(),
140 $this->ctrl->forwardCommand($new_gui);
142 case 'ilcommonactiondispatchergui':
143 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
145 $this->ctrl->forwardCommand($gui);
160 if ($cmd ==
"infoScreen") {
161 $ilCtrl->setCmd(
"showSummary");
162 $ilCtrl->setCmdClass(
"ilinfoscreengui");
165 $this->performCommand($cmd);
184 $this->
object->getTitle(),
199 if (!$this->plugin) {
207 if (!is_object($this->plugin)) {
208 throw new ilPluginException(
"ilObjectPluginGUI: Could not instantiate plugin object for type " . $this->
getType() .
".");
217 final protected function txt($a_var)
230 switch ($a_form_type) {
231 case self::CFORM_NEW:
234 case self::CFORM_IMPORT:
235 return $this->lng->txt(
"import");
237 case self::CFORM_CLONE:
238 return $this->
txt(
"objs_" . $this->
getType() .
"_duplicate");
283 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
285 $form->setTarget(
"_top");
286 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
287 $form->setTitle($this->
txt($a_new_type .
"_new"));
293 $ti->setRequired(
true);
302 $form->addCommandButton(
"save", $this->
txt($a_new_type .
"_add"));
303 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
318 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
320 $form->setTarget(
"_top");
321 $form->setFormAction(
$ilCtrl->getFormAction($this,
"update"));
328 $ti->setRequired(
true);
337 $form->addCommandButton(
"update",
$lng->txt(
"save"));
351 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
353 $form->setTarget(
"_top");
354 $form->setFormAction($this->ctrl->getFormAction($this,
"importFile"));
355 $form->setTitle($this->lng->txt(
"import"));
357 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
358 $fi =
new ilFileInputGUI($this->lng->txt(
"import_file"),
"importfile");
360 $fi->setRequired(
true);
363 $form->addCommandButton(
"importFile", $this->lng->txt(
"import"));
364 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
379 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
380 $ilCtrl->setTargetScript(
"ilias.php");
381 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
388 $ilCtrl->setParameterByClass(get_class($this),
"ref_id", $newObj->
getRefId());
410 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId())) {
413 $this->ctrl->getLinkTargetByClass(
432 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
435 $ilCtrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"),
436 array(
"perm",
"info",
"owner"),
452 $ilTabs->activateTab(
"info_short");
456 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
458 $info->enablePrivateNotes();
461 $lng->loadLanguageModule(
"meta");
480 public static function _goto($a_target)
485 $ilAccess = $DIC->access();
486 $lng = $DIC->language();
488 $t = explode(
"_", $a_target[0]);
490 $class_name = $a_target[1];
492 if ($ilAccess->checkAccess(
"read",
"",
$ref_id)) {
493 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
494 $ilCtrl->setTargetScript(
"ilias.php");
495 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
497 $ilCtrl->redirectByClass(
array(
"ilobjplugindispatchgui", $class_name),
"");
498 } elseif ($ilAccess->checkAccess(
"visible",
"",
$ref_id)) {
499 $ilCtrl->initBaseClass(
"ilObjPluginDispatchGUI");
500 $ilCtrl->setTargetScript(
"ilias.php");
501 $ilCtrl->getCallStructure(strtolower(
"ilObjPluginDispatchGUI"));
503 $ilCtrl->redirectByClass(
array(
"ilobjplugindispatchgui", $class_name),
"infoScreen");
504 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
506 $lng->txt(
"msg_no_perm_read_item"),
509 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin object.
initCreationForms($a_new_type)
Init creation froms.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
New implementation of ilObjectGUI.
GUI class for the workflow of copying objects.
const TITLE_LENGTH
max length of object title
txt($a_var)
Wrapper for txt function.
__construct($a_ref_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
addInfoItems($info)
Add items to info screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
fillCloneTemplate($a_tpl_varname, $a_type)
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _goto($a_target)
Goto redirection.
lookupParentTitleInCreationMode()
getPlugin()
Get plugin object.
executeCommand()
execute command
Export User Interface Class.
initImportForm($a_new_type)
Init object import form.
addPermissionTab()
Add permission tab.
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
if(isset($_POST['submit'])) $form
initCreateForm($a_new_type)
Init object creation form.
getType()
Functions that must be overwritten.
static lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.
static _lookupObjId($a_id)
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
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.
setTabs()
create tabs (repository/workspace switch)
addLocatorItems()
Add object to locator.
Create new PHPExcel object
obj_idprivate
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
addInfoTab()
Add info screen tab.
initEditForm()
Init object update form.
getCreationFormTitle($a_form_type)
Use custom creation form titles.
getRefId()
get reference id public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
afterSave(ilObject $newObj)
After saving public.
addAdminLocatorItems($a_do_not_add_object=false)
infoScreen()
show information screen
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setAdminTabs()
set admin tabs public