36 int $a_id_type = self::REPOSITORY_NODE_ID,
37 int $a_parent_node_id = 0
42 $this->slot_request = $DIC->repository()
48 $this->
ctrl = $DIC->ctrl();
49 $this->tpl = $DIC[
"tpl"];
50 $this->
access = $DIC->access();
51 $this->
lng = $DIC->language();
52 $this->nav_history = $DIC[
"ilNavigationHistory"];
53 $this->
tabs = $DIC->tabs();
54 $this->
locator = $DIC[
"ilLocator"];
55 $this->
user = $DIC->user();
56 $this->component_factory = $DIC[
"component.factory"];
57 $this->component_repository = $DIC[
"component.repository"];
80 if (strtolower($this->slot_request->getBaseClass()) !==
"iladministrationgui") {
89 if ($ilAccess->checkAccess(
'read',
'', $this->object->getRefId())) {
90 $ilNavigationHistory->addItem(
92 ilLink::_getLink($this->
object->getRefId(), $this->
object->getType()),
101 $this->slot_request->getRefId()
104 $this->slot_request->getRefId(),
111 $next_class = $this->
ctrl->getNextClass($this);
112 $cmd = $this->
ctrl->getCmd();
114 switch ($next_class) {
115 case "ilinfoscreengui":
120 case 'ilpermissiongui':
122 $ilTabs->setTabActive(
"perm_settings");
123 $ilCtrl->forwardCommand($perm_gui);
126 case 'ilobjectcopygui':
128 $cp->setType($this->
getType());
129 $this->
ctrl->forwardCommand($cp);
134 $this->
tabs->setTabActive(
"export");
136 $exp->addFormat(
'xml');
137 $this->
ctrl->forwardCommand($exp);
140 case 'illearningprogressgui':
142 if ($this->slot_request->getUserId() > 0 && $this->
access->checkAccess(
147 $user_id = $this->slot_request->getUserId();
149 $ilTabs->setTabActive(
"learning_progress");
152 $this->
object->getRefId(),
155 $this->
ctrl->forwardCommand($new_gui);
157 case 'ilcommonactiondispatchergui':
159 $this->
ctrl->forwardCommand($gui);
173 if ($cmd ===
"infoScreen") {
174 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
192 $this->
object->getTitle(),
195 $this->slot_request->getRefId()
206 if (!$this->plugin) {
207 $this->plugin = $this->component_factory->getPlugin($this->
getType());
212 final protected function txt(
string $a_var): string
242 $form->setTarget(
"_top");
243 $form->setFormAction($ilCtrl->getFormAction($this,
"update"));
244 $form->setTitle(
$lng->
txt(
"edit"));
250 $ti->setRequired(
true);
259 $form->addCommandButton(
"update",
$lng->
txt(
"save"));
269 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
272 $ilCtrl->setParameterByClass(get_class($this),
"ref_id", $new_object->
getRefId());
273 $ilCtrl->redirectByClass([
"ilobjplugindispatchgui", get_class($this)], $this->
getAfterCreationCmd());
291 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId())) {
294 $this->
ctrl->getLinkTargetByClass(
310 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
313 $ilCtrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"),
314 [
"perm",
"info",
"owner"],
326 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId())) {
329 $this->
ctrl->getLinkTargetByClass(
341 if ($this->
access->checkAccess(
'write',
"", $this->object->getRefId())) {
342 $this->
tabs->addTarget(
344 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
''),
362 $info->enablePrivateNotes();
370 $ilCtrl->forwardCommand(
$info);
383 public static function _goto(array $a_target): void
386 $main_tpl = $DIC->ui()->mainTemplate();
388 $ilCtrl = $DIC->ctrl();
389 $ilAccess = $DIC->access();
390 $lng = $DIC->language();
392 $t = explode(
"_", $a_target[0]);
394 $class_name = $a_target[1];
396 if ($ilAccess->checkAccess(
"read",
"",
$ref_id)) {
397 $ilCtrl->setTargetScript(
'ilias.php');
398 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
399 $ilCtrl->redirectByClass([
"ilobjplugindispatchgui", $class_name],
"");
400 } elseif ($ilAccess->checkAccess(
"visible",
"",
$ref_id)) {
401 $ilCtrl->setTargetScript(
'ilias.php');
402 $ilCtrl->setParameterByClass($class_name,
"ref_id",
$ref_id);
403 $ilCtrl->redirectByClass([
"ilobjplugindispatchgui", $class_name],
"infoScreen");
405 $main_tpl->setOnScreenMessage(
'failure', sprintf(
406 $lng->
txt(
"msg_no_perm_read_item"),
417 return $component_repository->
getPluginSlotById(
"robj")->getPluginByName($this->
getPlugin()->getPluginName())->supportsExport();
423 $this->slot_request->getRefId()
ilNavigationHistory $nav_history
Readable part of repository interface to ilComponentDataDB.
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
New implementation of ilObjectGUI.
GUI class for the workflow of copying objects.
ilComponentRepository $component_repository
addTarget(string $a_text, string $a_link, $a_cmd="", $a_cmdClass="", string $a_frame="", bool $a_activate=false, bool $a_dir_text=false)
afterSave(ilObject $new_object)
performCommand(string $cmd)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
loadLanguageModule(string $a_module)
Load language module.
lookupParentTitleInCreationMode()
setLocator()
Insert locator.
static _goto(array $a_target)
getPlugin()
Get plugin object.
static _lookupObjId(int $ref_id)
Object GUI class for repository plugins.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getAfterCreationCmd()
Cmd that will be redirected to after creation of a new object.
ilComponentFactory $component_factory
static _lookupTitle(int $obj_id)
getType()
Functions that must be overwritten.
getPluginSlotById(string $id)
Get pluginslot by id.
__construct(int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
ilGlobalTemplateInterface $tpl
loadStandardTemplate()
This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STA...
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
Last visited history for repository items.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
setTabs()
create tabs (repository/workspace switch)
getCreationFormTitle()
Use custom creation form titles.
addInilPluginAdminfoTab()
activateTab(string $a_id)
setTargetScript(string $a_target_script)
__construct(Container $dic, ilPlugin $plugin)
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
PluginSlotGUIRequest $slot_request
initEditForm()
Init object update form.
performNextClass(string $next_class)
static _lookupType(int $id, bool $reference=false)
Class ilObjUserTrackingGUI.
addAdminLocatorItems(bool $do_not_add_object=false)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
addInfoItems(ilInfoScreenGUI $info)
Add items to info screen.
setAdminTabs()
set admin tabs
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.