ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilPluginAdmin.php
Go to the documentation of this file.
1 <?php
2 
33 {
35 
36  public function __construct(ilComponentRepository $component_repository)
37  {
38  $this->component_repository = $component_repository;
39  }
40 
41  protected function getPluginInfo($a_ctype, $a_cname, $a_slot_id, $a_pname): \ilPluginInfo
42  {
43  return $this->component_repository
44  ->getComponentByTypeAndName(
45  $a_ctype,
46  $a_cname
47  )
48  ->getPluginSlotById(
49  $a_slot_id
50  )
51  ->getPluginByName(
52  $a_pname
53  );
54  }
55 
77  public function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname): bool
78  {
79  trigger_error("DEPRECATED: ilPluginAdmin::isActive is deprecated. Remove your usages of the method.");
80  try {
81  return $this->getPluginInfo($a_ctype, $a_cname, $a_slot_id, $a_pname)->isActive();
82  } catch (\InvalidArgumentException $e) {
83  return false;
84  }
85  }
86 }
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)