ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilRepositoryObjectPluginSlot Class Reference

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

+ Collaboration diagram for ilRepositoryObjectPluginSlot:

Static Public Member Functions

static addCreatableSubObjects (array $a_obj_array)
 
static isTypePlugin (string $a_type, bool $a_active_status=true)
 
static isTypePluginWithLP (string $a_type, bool $a_active_status=true)
 

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 Helper methods for repository object plugins

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ addCreatableSubObjects()

static ilRepositoryObjectPluginSlot::addCreatableSubObjects ( array  $a_obj_array)
static

Definition at line 27 of file class.ilRepositoryObjectPluginSlot.php.

References $DIC, and XapiProxy\$plugin.

27  : array
28  {
29  global $DIC;
30 
31  $component_repository = $DIC["component.repository"];
32  $plugins = $component_repository->getPluginSlotById("robj")->getActivePlugins();
33  foreach ($plugins as $plugin) {
34  $pl_id = $plugin->getId();
35  $a_obj_array[$pl_id] = ["name" => $pl_id, "lng" => $pl_id, "plugin" => true];
36  }
37 
38  return $a_obj_array;
39  }
global $DIC
Definition: feed.php:28

◆ isTypePlugin()

static ilRepositoryObjectPluginSlot::isTypePlugin ( string  $a_type,
bool  $a_active_status = true 
)
static

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

References $DIC, and XapiProxy\$plugin.

45  : bool {
46  global $DIC;
47 
48  $component_repository = $DIC["component.repository"];
49 
50  if (!$component_repository->hasPluginId($a_type)) {
51  return false;
52  }
53 
54  if (!$a_active_status) {
55  return true;
56  }
57 
58  $plugin = $component_repository->getPluginById($a_type);
59  return $plugin->isActive();
60  }
global $DIC
Definition: feed.php:28

◆ isTypePluginWithLP()

static ilRepositoryObjectPluginSlot::isTypePluginWithLP ( string  $a_type,
bool  $a_active_status = true 
)
static

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

References $DIC, and XapiProxy\$plugin.

Referenced by ilLPCollectionOfRepositoryObjects\getPossibleItems(), ilLPTableBaseGUI\getPossibleTypes(), ilObjectLP\getSupportedObjectTypes(), and ilPluginLP\initPlugin().

66  : bool {
67  global $DIC;
68  $component_repository = $DIC["component.repository"];
69 
70  if (!$component_repository->hasPluginId($a_type)) {
71  return false;
72  }
73  $slot = $component_repository->getPluginSlotById("robj");
74  if ($slot->hasPluginId($a_type)) {
75  $plugin = $slot->getPluginById($a_type);
76  if (!$a_active_status || $plugin->isActive()) {
77  if ($plugin->supportsLearningProgress()) {
78  return true;
79  }
80  }
81  }
82  return false;
83  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

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