4 include_once(
"./Services/Object/classes/class.ilObject2.php");
5 require_once(
'./Services/Component/classes/class.ilPlugin.php');
32 parent::__construct($a_ref_id,
true);
45 if (!self::$plugin_by_type[
$type]) {
49 $component_name ==
"Repository" 51 self::loadRepoPlugin($type);
56 $component_name ==
"OrgUnit" 58 self::loadOrgUnitPlugin($type);
62 return self::$plugin_by_type[
$type];
70 if (!is_null(
$name)) {
75 ilLoggerFactory::getLogger(
"obj")->log(
"Try to get repo plugin obj by type: $type_id. No such type exists for Repository and Org Unit pluginss.");
77 self::$plugin_by_type[$type_id] =
$plugin;
84 if (!is_null(
$name)) {
89 ilLoggerFactory::getLogger(
"obj")->log(
"Try to get repo plugin obj by type: $type_id. No such type exists for Repository and Org Unit pluginss.");
91 self::$plugin_by_type[$type_id] =
$plugin;
101 $pl = self::getPluginObjectByType($plugin_id);
102 return $pl->txt($lang_var);
112 if (!$this->plugin) {
120 if (!is_object($this->plugin)) {
121 throw new ilPluginException(
"ilObjectPlugin: Could not instantiate plugin object for type " . $this->
getType() .
".");
130 final protected function txt($a_var)
141 return $this->plugin->getParentTypes();
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
getParentTypes()
returns a list of all repository object types which can be a parent of this type. ...
static lookupTxtById($plugin_id, $lang_var)
static loadRepoPlugin(string $type_id)
txt($a_var)
Wrapper for txt function.
static getPluginObjectByType($type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin...
static lookupNameForId(string $a_ctype, string $a_cname, string $a_slot_id, string $a_plugin_id)
__construct($a_ref_id=0)
Constructor.
static lookupTypeInformationsForId(string $id)
getPlugin()
Get plugin object.
static getLogger($a_component_id)
Get component logger.
static loadOrgUnitPlugin(string $type_id)