ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilObjComponentSettingsGUI Class Reference

ilObjComponentSettingsGUI: ilPermissionGUI More...

+ Inheritance diagram for ilObjComponentSettingsGUI:
+ Collaboration diagram for ilObjComponentSettingsGUI:

Public Member Functions

 __construct ($data, int $id, bool $call_by_reference=true, bool $prepare_output=true)
 
 getUnsafeGetCommands ()
 This method must return a list of unsafe GET commands. More...
 
 getSafePostCommands ()
 This method must return a list of safe POST commands. More...
 
 executeCommand ()
 
 getAdminTabs ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Data Fields

const CMD_DEFAULT = "listPlugins"
 
const CMD_INSTALL_PLUGIN = "installPlugin"
 
const CMD_CONFIGURE = "configure"
 
const CMD_REFRESH_LANGUAGES = "refreshLanguages"
 
const CMD_ACTIVATE_PLUGIN = "activatePlugin"
 
const CMD_DEACTIVATE_PLUGIN = "deactivatePlugin"
 
const CMD_UPDATE_PLUGIN = "updatePlugin"
 
const CMD_JUMP_TO_PLUGIN_SLOT = "jumpToPluginSlot"
 
const CMD_UNINSTALL_PLUGIN = "uninstallPlugin"
 
const CMD_CONFIRM_UNINSTALL_PLUGIN = "confirmUninstallPlugin"
 
const P_REF_ID = 'ref_id'
 
const P_CTYPE = "ctype"
 
const P_CNAME = "cname"
 
const P_SLOT_ID = "slot_id"
 
const P_PLUGIN_NAME = "pname"
 
const P_PLUGIN_ID = "plugin_id"
 
const P_ADMIN_MODE = 'admin_mode'
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Protected Member Functions

 forwardConfigGUI (string $name)
 
 installPlugin ()
 
 update (ilPlugin $plugin)
 
 refreshLanguages ()
 
 activatePlugin ()
 
 deactivatePlugin ()
 
 updatePlugin ()
 
 confirmUninstallPlugin ()
 
 uninstallPlugin ()
 
 getPlugin ()
 
 listPlugins ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

ilTabsGUI $tabs
 
ilRbacSystem $rbac_system
 
ilDBInterface $db
 
ilComponentRepository $component_repository
 
ilComponentFactory $component_factory
 
ilErrorHandling $error
 
ILIAS Refinery Factory $refinery
 
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
 
Factory $ui
 
Renderer $renderer
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Attributes

const TYPE = 'cmps'
 
const TAB_PLUGINS = "plugins"
 
const TAB_PERMISSION = "perm_settings"
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjComponentSettingsGUI::__construct (   $data,
int  $id,
bool  $call_by_reference = true,
bool  $prepare_output = true 
)

Definition at line 65 of file class.ilObjComponentSettingsGUI.php.

References ilObjectGUI\$call_by_reference, ilObjectGUI\$data, $DIC, ilObjectGUI\$prepare_output, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ILIAS\Repository\tabs(), and ILIAS\Repository\ui().

66  {
68 
69  global $DIC;
70 
71  $this->tabs = $DIC->tabs();
72  $this->ctrl = $DIC->ctrl();
73  $this->rbac_system = $DIC->rbac()->system();
74  $this->db = $DIC->database();
75  $this->type = self::TYPE;
76  $this->component_repository = $DIC["component.repository"];
77  $this->component_factory = $DIC["component.factory"];
78  $this->error = $DIC["ilErr"];
79  $this->refinery = $DIC->refinery();
80  $this->request_wrapper = $DIC->http()->wrapper()->query();
81  $this->ui = $DIC->ui()->factory();
82  $this->renderer = $DIC->ui()->renderer();
83 
84  $this->lng->loadLanguageModule(self::TYPE);
85  }
global $DIC
Definition: shib_login.php:25
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ activatePlugin()

ilObjComponentSettingsGUI::activatePlugin ( )
protected

Definition at line 200 of file class.ilObjComponentSettingsGUI.php.

References Vendor\Package\$e, ILIAS\Repository\ctrl(), getPlugin(), and ILIAS\Repository\lng().

Referenced by executeCommand().

200  : void
201  {
202  $pl = $this->getPlugin();
203 
204  try {
205  $pl->activate();
206  $this->tpl->setOnScreenMessage("success", $this->lng->txt("cmps_plugin_activated"), true);
207  } catch (Exception $e) {
208  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
209  }
210 
211  $this->ctrl->redirect($this, self::CMD_DEFAULT);
212  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmUninstallPlugin()

ilObjComponentSettingsGUI::confirmUninstallPlugin ( )
protected

Definition at line 234 of file class.ilObjComponentSettingsGUI.php.

References ILIAS\Repository\ctrl(), getPlugin(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\ui().

Referenced by executeCommand().

234  : void
235  {
236  $pl = $this->getPlugin();
237 
238  $plugin_name = $this->request_wrapper->retrieve(self::P_PLUGIN_NAME, $this->refinery->kindlyTo()->string());
239 
240  $pl_info = $this->component_repository->getPluginByName($plugin_name);
241 
242  if ($pl_info->isActivated() || $pl_info->isActivationPossible()) {
243  $question = sprintf(
244  $this->lng->txt("cmps_uninstall_confirm"),
245  $pl->getPluginName()
246  );
247  } else {
248  $question = sprintf(
249  $this->lng->txt("cmps_uninstall_inactive_confirm"),
250  $pl->getPluginName(),
251  $pl_info->getReasonForInactivity()
252  );
253  }
254 
255  $this->ctrl->setParameter($this, self::P_PLUGIN_NAME, $pl_info->getName());
256  $buttons = array(
257  $this->ui->button()->standard(
258  $this->lng->txt('confirm'),
259  $this->ctrl->getLinkTarget($this, self::CMD_UNINSTALL_PLUGIN)
260  ),
261  $this->ui->button()->standard(
262  $this->lng->txt('cancel'),
263  $this->ctrl->getLinkTarget($this, 'showQuestionList')
264  )
265  );
266 
267  $this->tpl->setContent($this->renderer->render($this->ui->messageBox()->confirmation($question)->withButtons($buttons)));
268  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deactivatePlugin()

ilObjComponentSettingsGUI::deactivatePlugin ( )
protected

Definition at line 214 of file class.ilObjComponentSettingsGUI.php.

References Vendor\Package\$e, ILIAS\Repository\ctrl(), getPlugin(), and ILIAS\Repository\lng().

Referenced by executeCommand().

214  : void
215  {
216  $pl = $this->getPlugin();
217 
218  try {
219  $pl->deactivate();
220  $this->tpl->setOnScreenMessage("success", $this->lng->txt("cmps_plugin_deactivated"), true);
221  } catch (InvalidArgumentException $e) {
222  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
223  }
224 
225  $this->ctrl->redirect($this, self::CMD_DEFAULT);
226  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjComponentSettingsGUI::executeCommand ( )

Definition at line 102 of file class.ilObjComponentSettingsGUI.php.

References activatePlugin(), confirmUninstallPlugin(), ILIAS\Repository\ctrl(), deactivatePlugin(), forwardConfigGUI(), installPlugin(), listPlugins(), ILIAS\Repository\lng(), ilObjectGUI\prepareOutput(), refreshLanguages(), ILIAS\Repository\tabs(), uninstallPlugin(), and updatePlugin().

102  : void
103  {
104  $next_class = $this->ctrl->getNextClass($this);
105  $cmd = $this->ctrl->getCmd();
106 
107  $this->prepareOutput();
108 
109  if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
110  $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
111  }
112 
113  switch (true) {
114  case $next_class === 'ilpermissiongui':
115  $this->tabs->activateTab(self::TAB_PERMISSION);
116  $perm_gui = new ilPermissionGUI($this);
117  $this->ctrl->forwardCommand($perm_gui);
118  break;
119  case preg_match("/configgui$/i", $next_class):
120  $this->forwardConfigGUI($next_class);
121  break;
122  default:
123  switch ($cmd) {
124  case self::CMD_INSTALL_PLUGIN:
125  $this->installPlugin();
126  break;
127  case self::CMD_REFRESH_LANGUAGES:
128  $this->refreshLanguages();
129  break;
130  case self::CMD_ACTIVATE_PLUGIN:
131  $this->activatePlugin();
132  break;
133  case self::CMD_DEACTIVATE_PLUGIN:
134  $this->deactivatePlugin();
135  break;
136  case self::CMD_UPDATE_PLUGIN:
137  $this->updatePlugin();
138  break;
139  case self::CMD_CONFIRM_UNINSTALL_PLUGIN:
140  $this->confirmUninstallPlugin();
141  break;
142  case self::CMD_UNINSTALL_PLUGIN:
143  $this->uninstallPlugin();
144  break;
145  default:
146  $this->listPlugins();
147  }
148  }
149  }
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

◆ forwardConfigGUI()

ilObjComponentSettingsGUI::forwardConfigGUI ( string  $name)
protected

Definition at line 151 of file class.ilObjComponentSettingsGUI.php.

References XapiProxy\$plugin, ILIAS\Repository\ctrl(), and getPlugin().

Referenced by executeCommand().

151  : void
152  {
153  $name = $this->ctrl->lookupOriginalClassName($name);
154 
155  if (!class_exists($name)) {
156  throw new Exception("class $name not found!");
157  }
158 
159  $plugin = $this->getPlugin();
160  $gui = new $name();
161  $gui->setPluginObject($plugin);
162 
163  $this->ctrl->forwardCommand($gui);
164  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdminTabs()

ilObjComponentSettingsGUI::getAdminTabs ( )

Definition at line 317 of file class.ilObjComponentSettingsGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

317  : void
318  {
319  if ($this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
320  $this->tabs_gui->addTab(
321  self::TAB_PLUGINS,
322  $this->lng->txt("cmps_plugins"),
323  $this->ctrl->getLinkTarget($this, self::CMD_DEFAULT)
324  );
325  }
326 
327  if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
328  $this->tabs_gui->addTab(
329  "perm_settings",
330  $this->lng->txt("perm_settings"),
331  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
332  );
333  }
334 
335  if (
336  $this->request_wrapper->has(self::P_CTYPE) &&
337  $this->request_wrapper->retrieve(self::P_CTYPE, $this->refinery->kindlyTo()->string()) === "components/ILIAS"
338  ) {
339  $this->tabs_gui->activateTab("services");
340  }
341  }
+ Here is the call graph for this function:

◆ getPlugin()

ilObjComponentSettingsGUI::getPlugin ( )
protected

Definition at line 284 of file class.ilObjComponentSettingsGUI.php.

References ILIAS\Repository\refinery().

Referenced by activatePlugin(), confirmUninstallPlugin(), deactivatePlugin(), forwardConfigGUI(), installPlugin(), uninstallPlugin(), and updatePlugin().

284  : ilPlugin
285  {
286  $plugin_name = $this->request_wrapper->retrieve(self::P_PLUGIN_NAME, $this->refinery->kindlyTo()->string());
287  return $this->component_factory->getPlugin(
288  $this->component_repository->getPluginByName($plugin_name)->getId()
289  );
290  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSafePostCommands()

ilObjComponentSettingsGUI::getSafePostCommands ( )

This method must return a list of safe POST commands.

Safe post commands returned by this method will no longer be CSRF protected and will NOT be appended by an ilCtrlToken.

Returns
string[]

Implements ilCtrlSecurityInterface.

Definition at line 97 of file class.ilObjComponentSettingsGUI.php.

97  : array
98  {
99  return [];
100  }

◆ getUnsafeGetCommands()

ilObjComponentSettingsGUI::getUnsafeGetCommands ( )

This method must return a list of unsafe GET commands.

Unsafe get commands returned by this method will now be CSRF protected, which means an ilCtrlToken is appended each time a link-target is generated to the class implementing this interface with a command from that list.

Tokens will be validated in

See also
ilCtrlInterface::getCmd(), whereas the fallback command will be used if the CSRF validation fails.
Returns
string[]

Implements ilCtrlSecurityInterface.

Definition at line 87 of file class.ilObjComponentSettingsGUI.php.

87  : array
88  {
89  return [
90  self::CMD_UPDATE_PLUGIN,
91  self::CMD_ACTIVATE_PLUGIN,
92  self::CMD_DEACTIVATE_PLUGIN,
93  self::CMD_REFRESH_LANGUAGES,
94  ];
95  }

◆ installPlugin()

ilObjComponentSettingsGUI::installPlugin ( )
protected

Definition at line 166 of file class.ilObjComponentSettingsGUI.php.

References getPlugin(), and update().

Referenced by executeCommand().

166  : void
167  {
168  $pl = $this->getPlugin();
169 
170  $pl->install();
171  $this->update($pl);
172  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listPlugins()

ilObjComponentSettingsGUI::listPlugins ( )
protected

Definition at line 292 of file class.ilObjComponentSettingsGUI.php.

References XapiProxy\$plugin, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), ILIAS\Repository\ui(), and ilPluginsOverviewTable\withData().

Referenced by executeCommand().

292  : void
293  {
294  $this->tabs->activateTab(self::TAB_PLUGINS);
295 
296  $filters = new ilPluginsOverviewTableFilterGUI($this);
297 
298  $plugins = [];
299  foreach ($this->component_repository->getPlugins() as $plugin) {
300  $plugins[] = $plugin;
301  }
302 
303  $table = new ilPluginsOverviewTable(
304  $this,
305  $this->ctrl,
306  $this->ui,
307  $this->renderer,
308  $this->lng,
309  $filters->getData()
310  );
311 
312  $table = $table->withData($plugins)->getTable();
313 
314  $this->tpl->setContent($filters->getHTML() . $table);
315  }
Class ilPluginsOverviewTableFilterGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refreshLanguages()

ilObjComponentSettingsGUI::refreshLanguages ( )
protected

Definition at line 186 of file class.ilObjComponentSettingsGUI.php.

References Vendor\Package\$e, XapiProxy\$plugin, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

Referenced by executeCommand().

186  : void
187  {
188  try {
189  $plugin_name = $this->request_wrapper->retrieve(self::P_PLUGIN_NAME, $this->refinery->kindlyTo()->string());
190  $plugin = $this->component_repository->getPluginByName($plugin_name);
191  $language_handler = new ilPluginLanguage($plugin);
192  $language_handler->updateLanguages();
193  $this->tpl->setOnScreenMessage("success", $this->lng->txt("cmps_refresh_lng"), true);
194  } catch (Exception $e) {
195  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
196  }
197  $this->ctrl->redirect($this, self::CMD_DEFAULT);
198  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ uninstallPlugin()

ilObjComponentSettingsGUI::uninstallPlugin ( )
protected

Definition at line 270 of file class.ilObjComponentSettingsGUI.php.

References Vendor\Package\$e, ILIAS\Repository\ctrl(), getPlugin(), and ILIAS\Repository\lng().

Referenced by executeCommand().

270  : void
271  {
272  $pl = $this->getPlugin();
273 
274  try {
275  $pl->uninstall();
276  $this->tpl->setOnScreenMessage("success", $this->lng->txt("cmps_plugin_deinstalled"), true);
277  } catch (Exception $e) {
278  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
279  }
280 
281  $this->ctrl->redirect($this, self::CMD_DEFAULT);
282  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilObjComponentSettingsGUI::update ( ilPlugin  $plugin)
protected

Definition at line 174 of file class.ilObjComponentSettingsGUI.php.

References Vendor\Package\$e, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilPlugin\update().

Referenced by installPlugin(), and updatePlugin().

174  : void
175  {
176  try {
177  $plugin->update();
178  $this->tpl->setOnScreenMessage("success", $this->lng->txt("cmps_plugin_updated"), true);
179  } catch (Exception $e) {
180  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
181  }
182 
183  $this->ctrl->redirectByClass(ilAdministrationGUI::class, self::CMD_JUMP_TO_PLUGIN_SLOT);
184  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePlugin()

ilObjComponentSettingsGUI::updatePlugin ( )
protected

Definition at line 228 of file class.ilObjComponentSettingsGUI.php.

References getPlugin(), and update().

Referenced by executeCommand().

228  : void
229  {
230  $pl = $this->getPlugin();
231  $this->update($pl);
232  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $component_factory

ilComponentFactory ilObjComponentSettingsGUI::$component_factory
protected

Definition at line 58 of file class.ilObjComponentSettingsGUI.php.

◆ $component_repository

ilComponentRepository ilObjComponentSettingsGUI::$component_repository
protected

Definition at line 57 of file class.ilObjComponentSettingsGUI.php.

◆ $db

ilDBInterface ilObjComponentSettingsGUI::$db
protected

Definition at line 56 of file class.ilObjComponentSettingsGUI.php.

◆ $error

ilErrorHandling ilObjComponentSettingsGUI::$error
protected

Definition at line 59 of file class.ilObjComponentSettingsGUI.php.

◆ $rbac_system

ilRbacSystem ilObjComponentSettingsGUI::$rbac_system
protected

Definition at line 55 of file class.ilObjComponentSettingsGUI.php.

◆ $refinery

ILIAS Refinery Factory ilObjComponentSettingsGUI::$refinery
protected

Definition at line 60 of file class.ilObjComponentSettingsGUI.php.

◆ $renderer

Renderer ilObjComponentSettingsGUI::$renderer
protected

Definition at line 63 of file class.ilObjComponentSettingsGUI.php.

◆ $request_wrapper

ILIAS HTTP Wrapper RequestWrapper ilObjComponentSettingsGUI::$request_wrapper
protected

Definition at line 61 of file class.ilObjComponentSettingsGUI.php.

◆ $tabs

ilTabsGUI ilObjComponentSettingsGUI::$tabs
protected

Definition at line 54 of file class.ilObjComponentSettingsGUI.php.

◆ $ui

Factory ilObjComponentSettingsGUI::$ui
protected

Definition at line 62 of file class.ilObjComponentSettingsGUI.php.

◆ CMD_ACTIVATE_PLUGIN

const ilObjComponentSettingsGUI::CMD_ACTIVATE_PLUGIN = "activatePlugin"

◆ CMD_CONFIGURE

const ilObjComponentSettingsGUI::CMD_CONFIGURE = "configure"

◆ CMD_CONFIRM_UNINSTALL_PLUGIN

const ilObjComponentSettingsGUI::CMD_CONFIRM_UNINSTALL_PLUGIN = "confirmUninstallPlugin"

◆ CMD_DEACTIVATE_PLUGIN

const ilObjComponentSettingsGUI::CMD_DEACTIVATE_PLUGIN = "deactivatePlugin"

◆ CMD_DEFAULT

const ilObjComponentSettingsGUI::CMD_DEFAULT = "listPlugins"

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

◆ CMD_INSTALL_PLUGIN

const ilObjComponentSettingsGUI::CMD_INSTALL_PLUGIN = "installPlugin"

◆ CMD_JUMP_TO_PLUGIN_SLOT

const ilObjComponentSettingsGUI::CMD_JUMP_TO_PLUGIN_SLOT = "jumpToPluginSlot"

Definition at line 42 of file class.ilObjComponentSettingsGUI.php.

◆ CMD_REFRESH_LANGUAGES

const ilObjComponentSettingsGUI::CMD_REFRESH_LANGUAGES = "refreshLanguages"

◆ CMD_UNINSTALL_PLUGIN

const ilObjComponentSettingsGUI::CMD_UNINSTALL_PLUGIN = "uninstallPlugin"

Definition at line 43 of file class.ilObjComponentSettingsGUI.php.

◆ CMD_UPDATE_PLUGIN

const ilObjComponentSettingsGUI::CMD_UPDATE_PLUGIN = "updatePlugin"

◆ P_ADMIN_MODE

const ilObjComponentSettingsGUI::P_ADMIN_MODE = 'admin_mode'

Definition at line 52 of file class.ilObjComponentSettingsGUI.php.

◆ P_CNAME

const ilObjComponentSettingsGUI::P_CNAME = "cname"

◆ P_CTYPE

const ilObjComponentSettingsGUI::P_CTYPE = "ctype"

◆ P_PLUGIN_ID

const ilObjComponentSettingsGUI::P_PLUGIN_ID = "plugin_id"

◆ P_PLUGIN_NAME

const ilObjComponentSettingsGUI::P_PLUGIN_NAME = "pname"

◆ P_REF_ID

const ilObjComponentSettingsGUI::P_REF_ID = 'ref_id'

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

◆ P_SLOT_ID

const ilObjComponentSettingsGUI::P_SLOT_ID = "slot_id"

◆ TAB_PERMISSION

const ilObjComponentSettingsGUI::TAB_PERMISSION = "perm_settings"
private

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

◆ TAB_PLUGINS

const ilObjComponentSettingsGUI::TAB_PLUGINS = "plugins"
private

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

◆ TYPE

const ilObjComponentSettingsGUI::TYPE = 'cmps'
private

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


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