4include_once(
"./Services/Object/classes/class.ilObject2.php");
5require_once(
'./Services/Component/classes/class.ilPlugin.php');
45 if (!self::$plugin_by_type[
$type]) {
49 $component_name ==
"Repository"
56 $component_name ==
"OrgUnit"
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;
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();
An exception for terminatinating execution or to throw for unit testing.
static getLogger($a_component_id)
Get component logger.
Class ilObject2 This is an intermediate progress of ilObject class.
getType()
get object type @access public
__construct($a_ref_id=0)
Constructor.
getParentTypes()
returns a list of all repository object types which can be a parent of this type.
static lookupTxtById($plugin_id, $lang_var)
static loadOrgUnitPlugin(string $type_id)
static loadRepoPlugin(string $type_id)
txt($a_var)
Wrapper for txt function.
getPlugin()
Get plugin object.
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)
static lookupTypeInformationsForId(string $id)
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc