23 use \ILIAS\Modules\OrgUnit\ARHelper\DIC;
75 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
79 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
80 $DIC->language()->loadLanguageModule(
'bibl');
82 if (is_object($this->
object)) {
118 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
121 $link = $this->dic()->ctrl()->getLinkTarget($this, $this->
getStandardCmd());
122 if ($this->
object !=
null) {
123 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"bibl");
128 if ($this->
object instanceof
ilObjBibliographic && !
$DIC->access()->checkAccess(
'visible',
"", $this->object->getRefId())) {
132 $next_class = $this->dic()->ctrl()->getNextClass($this);
133 $this->cmd = $this->dic()->ctrl()->getCmd();
134 switch ($next_class) {
135 case strtolower(ilInfoScreenGUI::class):
137 $this->dic()->tabs()->activateTab(self::TAB_ID_INFO);
140 case strtolower(ilCommonActionDispatcherGUI::class):
142 $this->ctrl->forwardCommand($gui);
144 case strtolower(ilPermissionGUI::class):
146 $this->dic()->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
149 case strtolower(ilObjectCopyGUI::class):
151 $cp->setType(
'bibl');
152 $this->dic()[
'tpl']->getStandardTemplate();
153 $this->ctrl->forwardCommand($cp);
155 case strtolower(ilObjFileGUI::class):
157 $this->dic()->tabs()->setTabActive(self::TAB_ID_RECORDS);
158 $this->ctrl->forwardCommand(
new ilObjFile($this));
160 case strtolower(ilExportGUI::class):
162 $this->dic()->tabs()->setTabActive(self::TAB_EXPORT);
164 $exp_gui->addFormat(
"xml");
165 $this->ctrl->forwardCommand($exp_gui);
167 case strtolower(ilBiblFieldFilterGUI::class):
169 $this->dic()->tabs()->setTabActive(self::TAB_SETTINGS);
171 $this->tabs_gui->activateSubTab(self::SUB_TAB_FILTER);
176 $cmd = $this->ctrl->getCmd(self::CMD_SHOW_CONTENT);
183 $this->tabs_gui->activateSubTab(self::SUBTAB_SETTINGS);
204 $this->ctrl->setCmd(
"showSummary");
205 $this->ctrl->setCmdClass(ilInfoScreenGUI::class);
217 if (!$this->checkPermissionBoolAndReturn(
"visible") && !$this->checkPermissionBoolAndReturn(
'read')) {
219 $this->ctrl->redirectByClass(
'ilPersonalDesktopGUI',
'');
221 $DIC->tabs()->activateTab(self::TAB_ID_INFO);
223 $info->enablePrivateNotes();
224 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
225 $this->ctrl->forwardCommand(
$info);
235 $ilLocator =
$DIC[
'ilLocator'];
236 if (is_object($this->
object)) {
237 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"", $this->node_id);
248 public static function _goto($a_target)
252 $id = explode(
"_", $a_target);
253 $DIC->ctrl()->initBaseClass(ilRepositoryGUI::class);
254 $DIC->ctrl()->setParameterByClass(ilObjBibliographicGUI::class,
"ref_id",
$id[0]);
259 $DIC->ctrl()->redirectByClass(
261 ilRepositoryGUI::class,
262 ilObjBibliographicGUI::class,
264 self::CMD_SHOW_DETAILS
267 $DIC->ctrl()->redirectByClass(
269 ilRepositoryGUI::class,
270 ilObjBibliographicGUI::class,
287 $forms = parent::initCreationForms($a_new_type);
289 $in_file =
new ilFileInputGUI(
$DIC->language()->txt(
"bibliography_file"),
"bibliographic_file");
290 $in_file->setSuffixes(array(
"ris",
"bib",
"bibtex"));
291 $in_file->setRequired(
true);
293 $this->ctrl->saveParameterByClass(
'ilobjrootfoldergui',
'new_type');
294 $forms[
self::CFORM_NEW]->setFormAction($this->ctrl->getFormActionByClass(
'ilobjrootfoldergui',
"save"));
305 if (
$form[self::CFORM_NEW]->checkInput()) {
309 $form->setValuesByPost();
310 $DIC->ui()->mainTemplate()->setContent(
$form->getHtml());
324 $a_new_object->doUpdate();
326 $this->ctrl->redirect($this, self::CMD_EDIT);
340 $ilHelp =
$DIC[
'ilHelp'];
344 $ilHelp->setScreenIdComponent(
'bibl');
346 if (
$DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
347 $DIC->tabs()->addTab(
350 ->txt(self::TAB_CONTENT),
351 $this->ctrl->getLinkTarget($this, self::CMD_SHOW_CONTENT)
355 if (
$DIC->access()->checkAccess(
'visible',
"", $this->object->getRefId())
356 ||
$DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())
358 $DIC->tabs()->addTab(
362 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
366 if (
$DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
367 $DIC->tabs()->addTab(
368 self::SUBTAB_SETTINGS,
370 ->txt(self::SUBTAB_SETTINGS),
371 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
375 if (
$DIC->access()->checkAccess(
"write",
"", $this->object->getRefId())) {
376 $DIC->tabs()->addTab(
379 ->txt(self::TAB_EXPORT),
380 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
384 if (
$DIC->access()->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
385 $DIC->tabs()->addTab(
386 self::TAB_ID_PERMISSIONS,
388 ->txt(
"perm_settings"),
389 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
398 $DIC->tabs()->addSubTab(
399 self::SUBTAB_SETTINGS,
401 ->txt(self::SUBTAB_SETTINGS),
402 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_OBJECT)
404 $DIC->tabs()->addSubTab(
405 self::SUB_TAB_FILTER,
407 ->txt(
"bibl_filter"),
417 $form = parent::initEditForm();
421 ->txt(
"bibliography_file"),
424 $in_file->setSuffixes(array(
"ris",
"bib",
"bibtex"));
425 $in_file->setRequired(
false);
428 ->txt(
"override_entries"),
431 $cb_override->addSubItem($in_file);
433 $form->addItem($cb_override);
434 $form->setFormAction(
$DIC->ctrl()->getFormAction($this,
"save"));
447 $DIC->tabs()->activateTab(self::SUBTAB_SETTINGS);
461 $a_values[
"is_online"] = $this->
object->getOnline();
481 $read_access =
$DIC->access()->checkAccess(
'read',
"", $this->object->getRefId());
482 $online = $this->
object->getOnline();
483 $write_access =
$DIC->access()->checkAccess(
'write',
"", $this->object->getRefId());
484 if (($read_access && $online) || $write_access) {
485 $DIC->tabs()->activateTab(self::TAB_CONTENT);
488 $b->setCaption(
'download_original_file');
489 $b->setUrl(
$DIC->ctrl()->getLinkTargetByClass(self::class, self::CMD_SEND_FILE));
490 $b->setPrimary(
true);
491 $DIC->toolbar()->addButtonInstance($b);
495 $DIC->ui()->mainTemplate()->setContent(
$html);
498 $DIC->ui()->mainTemplate()->setPermanentLink(
"bibl", $this->object->getRefId());
504 ->txt(
"msg_no_perm_read_item"),
518 $table->writeFilterToSession();
520 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
529 $this->ctrl->redirect($this, self::CMD_SHOW_CONTENT);
540 if (
$DIC[
'ilAccess']->checkAccess(
'read',
"", $this->object->getRefId())) {
541 $file_path = $this->
object->getLegacyAbsolutePath();
543 if (is_file($file_path)) {
560 if (
$DIC->access()->checkAccess(
'read',
"", $this->object->getRefId())) {
562 $entry = $this->facade->entryFactory()
563 ->findByIdAndTypeString(
$id, $this->object->getFileTypeAsString());
566 $DIC->ui()->mainTemplate()->setContent($bibGUI->getHTML());
586 if (
$DIC->access()->checkAccess(
'write',
"", $this->object->getRefId())) {
587 if ($this->object->getOnline() != $a_form->
getInput(
"is_online")) {
588 $this->
object->setOnline($a_form->
getInput(
"is_online"));
591 if (!empty($_FILES[
'bibliographic_file'][
'name'])) {
592 $this->
addNews($this->object->getId(),
'updated');
604 switch (
$_GET[
"ntf"]) {
624 $DIC->ctrl()->redirect($this,
"");
636 $ilNewsItem->setTitle(
$DIC->language()->txt(
'news_title_' . $change));
639 $ilNewsItem->setUserId(
$DIC->user()->getId());
641 $ilNewsItem->setContentTextIsLangVar(
false);
642 $ilNewsItem->create();
656 ilUtil::sendSuccess(
$DIC->language()->txt(
"added_to_desktop"),
true);
657 $this->ctrl->redirect($this, self::CMD_VIEW);
671 ilUtil::sendSuccess(
$DIC->language()->txt(
"removed_from_desktop"),
true);
672 $this->ctrl->redirect($this, self::CMD_VIEW);
706 $a_new_object->parseFileToDatabase();
708 parent::afterImport($a_new_object);
An exception for terminatinating execution or to throw for unit testing.
Class ilBiblEntryDetailPresentationGUI.
Class ilDataCollectionField.
Class ilBiblFactoryFacade.
Class ilBiblFieldFilterGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static addToDesktop()
Add desktop item @access public.
static removeFromDesktop()
Remove item from personal desktop @access public.
Export User Interface Class.
static deliverFileAttached($path_to_file, $download_file_name='', $mime_type='', $delete_file=false)
void
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
const TYPE_DATA_COLLECTION
Class ilObjBibliographicGUI.
initEditCustomForm(ilPropertyFormGUI $a_form)
addNews($obj_id, $change='created')
initEditForm()
Init object edit form.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
static _goto($a_target)
_goto Deep link
addToDeskObject()
Add desktop item.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
addLocatorItems()
Functions to be overwritten.
infoScreenForward()
show information screen
executeCommand()
executeCommand
getEditFormCustomValues(array &$a_values)
initCreationForms($a_new_type)
removeFromDesk()
Remove from desktop.
getStandardCmd()
getStandardCmd
sendFile()
provide file as a download
addToDesk()
Add desktop item.
showContent()
shows the overview page with all entries in a table
updateCustom(ilPropertyFormGUI $a_form)
updateSettings
removeFromDeskObject()
Remove from desktop.
view()
view object content (repository/workspace switch)
Class ilObjBibliographic.
New implementation of ilObjectGUI.
setTabs()
create tabs (repository/workspace switch)
prepareOutput($a_show_subobjects=true)
prepare output
GUI class for the workflow of copying objects.
afterImport(ilObject $a_new_object)
Post (successful) object import hook.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
addHeaderAction()
Add header action menu.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getId()
get object id @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
if(empty($password)) $table
if(isset($_POST['submit'])) $form