ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 64 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(), renderer(), ILIAS\Repository\tabs(), and ILIAS\Repository\ui().

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

Member Function Documentation

◆ activatePlugin()

ilObjComponentSettingsGUI::activatePlugin ( )
protected

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

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

Referenced by executeCommand().

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

◆ confirmUninstallPlugin()

ilObjComponentSettingsGUI::confirmUninstallPlugin ( )
protected

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

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

Referenced by executeCommand().

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

◆ deactivatePlugin()

ilObjComponentSettingsGUI::deactivatePlugin ( )
protected

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

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

Referenced by executeCommand().

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

◆ executeCommand()

ilObjComponentSettingsGUI::executeCommand ( )

Definition at line 101 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().

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

◆ forwardConfigGUI()

ilObjComponentSettingsGUI::forwardConfigGUI ( string  $name)
protected

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

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

Referenced by executeCommand().

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

◆ getAdminTabs()

ilObjComponentSettingsGUI::getAdminTabs ( )

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

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

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

◆ getPlugin()

ilObjComponentSettingsGUI::getPlugin ( )
protected

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

References ILIAS\Repository\refinery().

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

283  : ilPlugin
284  {
285  $plugin_name = $this->request_wrapper->retrieve(self::P_PLUGIN_NAME, $this->refinery->kindlyTo()->string());
286  return $this->component_factory->getPlugin(
287  $this->component_repository->getPluginByName($plugin_name)->getId()
288  );
289  }
+ 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 96 of file class.ilObjComponentSettingsGUI.php.

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

◆ 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 86 of file class.ilObjComponentSettingsGUI.php.

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

◆ installPlugin()

ilObjComponentSettingsGUI::installPlugin ( )
protected

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

References getPlugin(), and update().

Referenced by executeCommand().

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

◆ listPlugins()

ilObjComponentSettingsGUI::listPlugins ( )
protected

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

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

Referenced by executeCommand().

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

◆ refreshLanguages()

ilObjComponentSettingsGUI::refreshLanguages ( )
protected

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

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

Referenced by executeCommand().

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

◆ uninstallPlugin()

ilObjComponentSettingsGUI::uninstallPlugin ( )
protected

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

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

Referenced by executeCommand().

269  : void
270  {
271  $pl = $this->getPlugin();
272 
273  try {
274  $pl->uninstall();
275  $this->tpl->setOnScreenMessage("success", $this->lng->txt("cmps_plugin_deinstalled"), true);
276  } catch (Exception $e) {
277  $this->tpl->setOnScreenMessage("failure", $e->getMessage(), true);
278  }
279 
280  $this->ctrl->redirect($this, self::CMD_DEFAULT);
281  }
+ 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 173 of file class.ilObjComponentSettingsGUI.php.

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

Referenced by installPlugin(), and updatePlugin().

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

◆ updatePlugin()

ilObjComponentSettingsGUI::updatePlugin ( )
protected

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

References getPlugin(), and update().

Referenced by executeCommand().

227  : void
228  {
229  $pl = $this->getPlugin();
230  $this->update($pl);
231  }
+ 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 57 of file class.ilObjComponentSettingsGUI.php.

◆ $component_repository

ilComponentRepository ilObjComponentSettingsGUI::$component_repository
protected

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

◆ $db

ilDBInterface ilObjComponentSettingsGUI::$db
protected

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

◆ $error

ilErrorHandling ilObjComponentSettingsGUI::$error
protected

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

◆ $rbac_system

ilRbacSystem ilObjComponentSettingsGUI::$rbac_system
protected

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

◆ $refinery

ILIAS Refinery Factory ilObjComponentSettingsGUI::$refinery
protected

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

◆ $renderer

Renderer ilObjComponentSettingsGUI::$renderer
protected

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

◆ $request_wrapper

ILIAS HTTP Wrapper RequestWrapper ilObjComponentSettingsGUI::$request_wrapper
protected

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

◆ $tabs

ilTabsGUI ilObjComponentSettingsGUI::$tabs
protected

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

◆ $ui

Factory ilObjComponentSettingsGUI::$ui
protected

Definition at line 61 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 34 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 41 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 42 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 51 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 45 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 32 of file class.ilObjComponentSettingsGUI.php.

◆ TAB_PLUGINS

const ilObjComponentSettingsGUI::TAB_PLUGINS = "plugins"
private

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

◆ TYPE

const ilObjComponentSettingsGUI::TYPE = 'cmps'
private

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


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