ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilPluginAdmin.php
Go to the documentation of this file.
1 <?php
32 {
34 
35  public function __construct(ilComponentRepository $component_repository)
36  {
37  $this->component_repository = $component_repository;
38  }
39 
40  protected function getPluginInfo($a_ctype, $a_cname, $a_slot_id, $a_pname): \ilPluginInfo
41  {
42  return $this->component_repository
43  ->getComponentByTypeAndName(
44  $a_ctype,
45  $a_cname
46  )
47  ->getPluginSlotById(
48  $a_slot_id
49  )
50  ->getPluginByName(
51  $a_pname
52  );
53  }
54 
76  public function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname): bool
77  {
78  trigger_error("DEPRECATED: ilPluginAdmin::isActive is deprecated. Remove your usages of the method.");
79  try {
80  return $this->getPluginInfo($a_ctype, $a_cname, $a_slot_id, $a_pname)->isActive();
81  } catch (\InvalidArgumentException $e) {
82  return false;
83  }
84  }
85 }
Readable part of repository interface to ilComponentDataDB.
isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
Checks whether plugin is active (include version checks)
ilComponentRepository $component_repository
getPluginInfo($a_ctype, $a_cname, $a_slot_id, $a_pname)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Simple value class for information about a plugin.
__construct(ilComponentRepository $component_repository)