ILIAS  release_8 Revision v8.24
ilBiblAdminFieldGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilBiblAdminFieldGUI:
+ Collaboration diagram for ilBiblAdminFieldGUI:

Public Member Functions

 __construct (ilBiblAdminFactoryFacadeInterface $facade)
 ilBiblAdminFieldGUI constructor. More...
 
 executeCommand ()
 

Data Fields

const CMD_INIT_DEFAULT_FIELDS_AND_SORTING = 'initDefaultFieldsAndSorting'
 
const SUBTAB_RIS = 'subtab_ris'
 
const SUBTAB_BIBTEX = 'subtab_bibtex'
 
const FIELD_IDENTIFIER = 'field_id'
 
const DATA_TYPE = 'data_type'
 
const CMD_STANDARD = 'index'
 
const CMD_CANCEL = 'cancel'
 
const CMD_EDIT = 'edit'
 
const CMD_UPDATE = 'update'
 
const CMD_APPLY_FILTER = 'applyFilter'
 
const CMD_RESET_FILTER = 'resetFilter'
 
const CMD_SAVE = 'save'
 

Protected Member Functions

 performCommand ()
 
 index ()
 
 setSubTabs ()
 
 save ()
 
 applyFilter ()
 
 resetFilter ()
 

Protected Attributes

ilBiblAdminFactoryFacadeInterface $facade
 

Private Attributes

ilGlobalTemplateInterface $main_tpl
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilBiblAdminFieldGUI

Author
Benjamin Seglias bs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 24 of file class.ilBiblAdminFieldGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBiblAdminFieldGUI::__construct ( ilBiblAdminFactoryFacadeInterface  $facade)

ilBiblAdminFieldGUI constructor.

Definition at line 46 of file class.ilBiblAdminFieldGUI.php.

47 {
48 global $DIC;
49 $this->main_tpl = $DIC->ui()->mainTemplate();
50 $this->facade = $facade;
51 }
ilBiblAdminFactoryFacadeInterface $facade
global $DIC
Definition: feed.php:28

References $DIC, and $facade.

Member Function Documentation

◆ applyFilter()

ilBiblAdminFieldGUI::applyFilter ( )
protected

Definition at line 162 of file class.ilBiblAdminFieldGUI.php.

162 : void
163 {
164 $ilBiblAdminFieldTableGUI = new ilBiblAdminFieldTableGUI($this, $this->facade);
165 $ilBiblAdminFieldTableGUI->writeFilterToSession();
166 $this->ctrl()->redirect($this, self::CMD_STANDARD);
167 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ executeCommand()

ilBiblAdminFieldGUI::executeCommand ( )

Definition at line 53 of file class.ilBiblAdminFieldGUI.php.

53 : void
54 {
55 $nextClass = $this->ctrl()->getNextClass();
56 $this->tabs()->activateTab(ilObjBibliographicAdminGUI::TAB_FIELDS);
57 switch ($nextClass) {
58 case strtolower(ilBiblTranslationGUI::class):
59 $this->tabs()->clearTargets();
60 $target = $this->ctrl()->getLinkTarget($this);
61 $this->tabs()->setBackTarget($this->lng()->txt('back'), $target);
62
63 $field_id = $this->http()->request()->getQueryParams()[self::FIELD_IDENTIFIER];
64 if (!$field_id) {
65 throw new ilException("Field not found");
66 }
67 $this->ctrl()->saveParameter($this, self::FIELD_IDENTIFIER);
68 $field = $this->facade->fieldFactory()->findById($field_id);
69
70 $gui = new ilBiblTranslationGUI($this->facade, $field);
71 $this->ctrl()->forwardCommand($gui);
72 break;
73
74 default:
75 $this->performCommand();
76 }
77 }
Class ilBiblTranslationGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.

References ILIAS\Repository\ctrl(), FIELD_IDENTIFIER, ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), performCommand(), ilObjBibliographicAdminGUI\TAB_FIELDS, and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ index()

ilBiblAdminFieldGUI::index ( )
protected

Definition at line 100 of file class.ilBiblAdminFieldGUI.php.

100 : void
101 {
102 $this->setSubTabs();
103
104 $table = new ilBiblAdminFieldTableGUI($this, $this->facade);
105 $this->tpl()->setContent($table->getHTML());
106 }

References setSubTabs().

+ Here is the call graph for this function:

◆ performCommand()

ilBiblAdminFieldGUI::performCommand ( )
protected

Definition at line 79 of file class.ilBiblAdminFieldGUI.php.

79 : void
80 {
81 $cmd = $this->ctrl()->getCmd(self::CMD_STANDARD);
82 switch ($cmd) {
84 if ($this->checkPermissionBoolAndReturn('read')) {
85 $this->{$cmd}();
86 }
87 break;
88 case self::CMD_EDIT:
90 case self::CMD_SAVE:
93 if ($this->checkPermissionBoolAndReturn('write')) {
94 $this->{$cmd}();
95 }
96 break;
97 }
98 }

References CMD_APPLY_FILTER, CMD_EDIT, CMD_RESET_FILTER, CMD_SAVE, CMD_STANDARD, CMD_UPDATE, and ILIAS\Repository\ctrl().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilter()

ilBiblAdminFieldGUI::resetFilter ( )
protected

Definition at line 169 of file class.ilBiblAdminFieldGUI.php.

169 : void
170 {
171 $ilBiblAdminFieldTableGUI = new ilBiblAdminFieldTableGUI($this, $this->facade);
172 $ilBiblAdminFieldTableGUI->resetFilter();
173 $ilBiblAdminFieldTableGUI->resetOffset();
174 $this->ctrl()->redirect($this, self::CMD_STANDARD);
175 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ save()

ilBiblAdminFieldGUI::save ( )
protected

Definition at line 144 of file class.ilBiblAdminFieldGUI.php.

144 : void
145 {
146 // I currently did not find a way to use the wrapper here
147 $positions = $this->http()->request()->getParsedBody()['position'];
148
149 foreach ($positions as $set) {
150 $field_id = (int) key($set);
151 $position = (int) current($set);
152
153 $ilBiblField = $this->facade->fieldFactory()->findById($field_id);
154 $ilBiblField->setPosition($position);
155 $ilBiblField->store();
156 }
157
158 $this->main_tpl->setOnScreenMessage('success', $this->lng()->txt('changes_successfully_saved'));
159 $this->ctrl()->redirect($this, self::CMD_STANDARD);
160 }

References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\int(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ setSubTabs()

ilBiblAdminFieldGUI::setSubTabs ( )
protected

Definition at line 108 of file class.ilBiblAdminFieldGUI.php.

108 : void
109 {
110 $this->tabs()->addSubTab(
111 self::SUBTAB_RIS,
112 $this->lng()->txt('ris'),
113 $this->ctrl()->getLinkTargetByClass(
114 array(
115 ilObjBibliographicAdminGUI::class,
116 ilBiblAdminRisFieldGUI::class,
117 ),
119 )
120 );
121 $this->tabs()->activateSubTab(self::SUBTAB_RIS);
122
123 $this->tabs()->addSubTab(
124 self::SUBTAB_BIBTEX,
125 $this->lng()->txt('bibtex'),
126 $this->ctrl()->getLinkTargetByClass(
127 array(
128 ilObjBibliographicAdminGUI::class,
129 ilBiblAdminBibtexFieldGUI::class,
130 ),
132 )
133 );
134 switch ($this->facade->type()->getId()) {
136 $this->tabs()->activateSubTab(self::SUBTAB_BIBTEX);
137 break;
139 $this->tabs()->activateSubTab(self::SUBTAB_RIS);
140 break;
141 }
142 }

References CMD_STANDARD, ILIAS\Repository\ctrl(), ilBiblTypeFactoryInterface\DATA_TYPE_BIBTEX, ilBiblTypeFactoryInterface\DATA_TYPE_RIS, ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $facade

ilBiblAdminFactoryFacadeInterface ilBiblAdminFieldGUI::$facade
protected

Definition at line 40 of file class.ilBiblAdminFieldGUI.php.

Referenced by __construct().

◆ $main_tpl

ilGlobalTemplateInterface ilBiblAdminFieldGUI::$main_tpl
private

Definition at line 41 of file class.ilBiblAdminFieldGUI.php.

◆ CMD_APPLY_FILTER

const ilBiblAdminFieldGUI::CMD_APPLY_FILTER = 'applyFilter'

Definition at line 37 of file class.ilBiblAdminFieldGUI.php.

Referenced by performCommand().

◆ CMD_CANCEL

const ilBiblAdminFieldGUI::CMD_CANCEL = 'cancel'

Definition at line 34 of file class.ilBiblAdminFieldGUI.php.

◆ CMD_EDIT

const ilBiblAdminFieldGUI::CMD_EDIT = 'edit'

Definition at line 35 of file class.ilBiblAdminFieldGUI.php.

Referenced by performCommand().

◆ CMD_INIT_DEFAULT_FIELDS_AND_SORTING

const ilBiblAdminFieldGUI::CMD_INIT_DEFAULT_FIELDS_AND_SORTING = 'initDefaultFieldsAndSorting'

Definition at line 28 of file class.ilBiblAdminFieldGUI.php.

◆ CMD_RESET_FILTER

const ilBiblAdminFieldGUI::CMD_RESET_FILTER = 'resetFilter'

Definition at line 38 of file class.ilBiblAdminFieldGUI.php.

Referenced by performCommand().

◆ CMD_SAVE

const ilBiblAdminFieldGUI::CMD_SAVE = 'save'

◆ CMD_STANDARD

const ilBiblAdminFieldGUI::CMD_STANDARD = 'index'

Definition at line 33 of file class.ilBiblAdminFieldGUI.php.

Referenced by performCommand(), and setSubTabs().

◆ CMD_UPDATE

const ilBiblAdminFieldGUI::CMD_UPDATE = 'update'

Definition at line 36 of file class.ilBiblAdminFieldGUI.php.

Referenced by performCommand().

◆ DATA_TYPE

const ilBiblAdminFieldGUI::DATA_TYPE = 'data_type'

Definition at line 32 of file class.ilBiblAdminFieldGUI.php.

◆ FIELD_IDENTIFIER

const ilBiblAdminFieldGUI::FIELD_IDENTIFIER = 'field_id'

◆ SUBTAB_BIBTEX

const ilBiblAdminFieldGUI::SUBTAB_BIBTEX = 'subtab_bibtex'

Definition at line 30 of file class.ilBiblAdminFieldGUI.php.

◆ SUBTAB_RIS

const ilBiblAdminFieldGUI::SUBTAB_RIS = 'subtab_ris'

Definition at line 29 of file class.ilBiblAdminFieldGUI.php.


The documentation for this class was generated from the following file: