ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjectDefinition Class Reference

parses the objects.xml it handles the xml-description of all ilias objects More...

+ Collaboration diagram for ilObjectDefinition:

Public Member Functions

 __construct ()
 Constructor. More...
 
 readDefinitionData ()
 Read object definition data. More...
 
 getClassName ($a_obj_name)
 get class name by type More...
 
 getLocation ($a_obj_name)
 get location by type More...
 
 getGroup ($a_id)
 Get Group information. More...
 
 getGroupOfObj ($a_obj_name)
 Get Group of object type. More...
 
 hasCheckbox ($a_obj_name)
 should the object get a checkbox (needed for 'cut','copy' ...) More...
 
 getTranslationType ($a_obj_name)
 get translation type (sys, db or 0)s More...
 
 stopInheritance ($a_obj_name)
 Does object permits stopping inheritance? More...
 
 getDevMode ($a_obj_name)
 get devmode status by type More...
 
 getDevModeAll ()
 get all object types in devmode More...
 
 isRBACObject ($a_obj_name)
 get RBAC status by type returns true if object type is a RBAC object type More...
 
 isPlugin ($a_obj_name)
 get RBAC status by type returns true if object type is an (activated) plugin type More...
 
 isPluginTypeName ($a_str)
 Check if given type is a plugin type name (starts with an "x") More...
 
 isActivePluginType ($type)
 Returns true iff the given type is an active type of a repositoryObject or Organisation Unit Extension plugin. More...
 
 getAllRBACObjects ()
 get all RBAC object types More...
 
 getAllObjects ()
 get all object types More...
 
 allowLink ($a_obj_name)
 checks if linking of an object type is allowed More...
 
 allowCopy ($a_obj_name)
 checks if copying of an object type is allowed More...
 
 allowExport ($a_obj_name)
 
 hasLocalRoles ($a_obj_type)
 Check whether the creation of local roles is allowed Currently disabled for type "root" and "adm". More...
 
 getSubObjects ($a_obj_type, $a_filter=true)
 get all subobjects by type More...
 
 getSubObjectsRecursively ($a_obj_type, $a_include_source_obj=true, $a_add_admin_objects=false)
 Get all subobjects by type. More...
 
 getSubobjectsToFilter ($a_obj_type="adm")
 get all subjects except (rolf) of the adm object This is necessary for filtering these objects in role perm view. More...
 
 getCreatableSubObjects ($a_obj_type, $a_context=self::MODE_REPOSITORY, $a_parent_ref_id=null)
 get only creatable subobjects by type More...
 
 getSubObjectsAsString ($a_obj_type)
 get a string of all subobjects by type More...
 
 isContainer ($a_obj_name)
 Check if object type is container ('crs','fold','grp' ...) More...
 
 setHandlers ($a_xml_parser)
 set event handler More...
 
 handlerBeginTag ($a_xml_parser, $a_name, $a_attribs)
 start tag handler More...
 
 handlerCharacterData ($a_xml_parser, $a_data)
 end tag handler More...
 
 handlerEndTag ($a_xml_parser, $a_name)
 end tag handler More...
 
 __filterObjects (&$subobjects)
 
 isSystemObject ($a_obj_name)
 checks if object type is a system object More...
 
 isSideBlock ($a_obj_name)
 Check, whether object type is a side block. More...
 
 isAllowedInRepository ($a_obj_name)
 checks if object type can be used in repository context More...
 
 getAllRepositoryTypes ($a_incl_adm=false)
 get all RBAC object types More...
 
 isAllowedInWorkspace ($a_obj_name)
 checks if object type can be used in workspace context More...
 
 isAdministrationObject ($a_obj_name)
 Check if administration object. More...
 
 isInactivePlugin ($a_type)
 Check whether type belongs to inactive plugin. More...
 
 getAdvancedMetaDataTypes ()
 Get advanced meta data objects. More...
 
 getOrgUnitPermissionTypes ()
 Get object type with orgunit position permission support. More...
 
 getLTIProviderTypes ()
 Get object types which offer lti provider support. More...
 
 isOrgUnitPermissionType ($a_obj_type)
 Check if object type offers orgunit position support. More...
 
 getPositionByType ($a_type)
 Get Position By Object Type. More...
 
 getPlugins ()
 Get plugin object info. More...
 
 getExplorerContainerTypes ()
 Get all object types which are defined as container in an explorer context. More...
 

Static Public Member Functions

static getRepositoryObjectTypesForComponent ( $a_component_type, $a_component_name)
 Get all repository object types of component. More...
 
static getComponentForType ($a_obj_type)
 Get component for object type. More...
 
static getGroupedRepositoryObjectTypes ($a_parent_obj_type)
 

Data Fields

 $obj_id
 
 $parent
 
 $obj_data
 
 $sub_types = array()
 
const MODE_REPOSITORY = 1
 
const MODE_WORKSPACE = 2
 
const MODE_ADMINISTRATION = 3
 

Protected Member Functions

 readDefinitionDataFromCache ()
 
 readDefinitionDataFromDB ()
 
 readPluginData ()
 Loads the different plugins into the object definition. More...
 
 parsePluginData ($component, $slotName, $slotId, $isInAdministration)
 loads a single plugin definition into the object definition More...
 

Static Protected Member Functions

static getGroupedPluginObjectTypes ($grouped_obj, $component, $slotName, $slotId)
 

Protected Attributes

 $plugin_admin
 
 $settings
 

Detailed Description

parses the objects.xml it handles the xml-description of all ilias objects

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

ilObjDefReader on il_object_def, il_object_subobj, il_object_group

Definition at line 15 of file class.ilObjectDefinition.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjectDefinition::__construct ( )

Constructor.

Definition at line 58 of file class.ilObjectDefinition.php.

References $DIC, readDefinitionData(), and settings().

59  {
60  global $DIC;
61 
62  $this->plugin_admin = $DIC["ilPluginAdmin"];
63  $this->settings = $DIC->settings();
64  $this->readDefinitionData();
65  }
global $DIC
Definition: saml.php:7
readDefinitionData()
Read object definition data.
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

Member Function Documentation

◆ __filterObjects()

ilObjectDefinition::__filterObjects ( $subobjects)

Definition at line 789 of file class.ilObjectDefinition.php.

References $data, and $type.

Referenced by getSubObjects().

790  {
791  foreach ($subobjects as $type => $data) {
792  switch ($type) {
793  default:
794  // DO NOTHING
795  }
796  }
797  }
$type
+ Here is the caller graph for this function:

◆ allowCopy()

ilObjectDefinition::allowCopy (   $a_obj_name)

checks if copying of an object type is allowed

Parameters
stringobject type public

Definition at line 470 of file class.ilObjectDefinition.php.

471  {
472  return (bool) $this->obj_data[$a_obj_name]["allow_copy"];
473  }

◆ allowExport()

ilObjectDefinition::allowExport (   $a_obj_name)

Definition at line 475 of file class.ilObjectDefinition.php.

476  {
477  return (bool) $this->obj_data[$a_obj_name]['export'];
478  }

◆ allowLink()

ilObjectDefinition::allowLink (   $a_obj_name)

checks if linking of an object type is allowed

Parameters
stringobject type public

Definition at line 459 of file class.ilObjectDefinition.php.

460  {
461  return (bool) $this->obj_data[$a_obj_name]["allow_link"];
462  }

◆ getAdvancedMetaDataTypes()

ilObjectDefinition::getAdvancedMetaDataTypes ( )

Get advanced meta data objects.

Parameters

Definition at line 990 of file class.ilObjectDefinition.php.

References $sub_types, $t, $type, and array.

991  {
992  $amet = array();
993  foreach ($this->obj_data as $k => $v) {
994  if ($v["amet"]) {
995  $amet[] = array("obj_type" => $k, "sub_type" => "");
996  }
997  }
998 
999  foreach ($this->sub_types as $type => $sub_types) {
1000  foreach ($sub_types as $t) {
1001  if ($t["amet"]) {
1002  $amet[] = array("obj_type" => $type, "sub_type" => $t["sub_type"]);
1003  }
1004  }
1005  }
1006 
1007  return $amet;
1008  }
$type
Create styles array
The data for the language used.

◆ getAllObjects()

ilObjectDefinition::getAllObjects ( )

get all object types

public

Returns
array object types

Definition at line 448 of file class.ilObjectDefinition.php.

449  {
450  return array_keys($this->obj_data);
451  }

◆ getAllRBACObjects()

ilObjectDefinition::getAllRBACObjects ( )

get all RBAC object types

public

Returns
array object types set to development

Definition at line 429 of file class.ilObjectDefinition.php.

References $type, array, and isRBACObject().

430  {
431  $types = array_keys($this->obj_data);
432 
433  foreach ($types as $type) {
434  if ($this->isRBACObject($type)) {
435  $rbactypes[] = $type;
436  }
437  }
438 
439  return $rbactypes ? $rbactypes : array();
440  }
$type
Create styles array
The data for the language used.
isRBACObject($a_obj_name)
get RBAC status by type returns true if object type is a RBAC object type
+ Here is the call graph for this function:

◆ getAllRepositoryTypes()

ilObjectDefinition::getAllRepositoryTypes (   $a_incl_adm = false)

get all RBAC object types

public

Returns
array object types set to development

Definition at line 933 of file class.ilObjectDefinition.php.

References $type, array, isAdministrationObject(), and isAllowedInRepository().

934  {
935  $types = array_keys($this->obj_data);
936 
937  foreach ($types as $type) {
938  if ($this->isAllowedInRepository($type) &&
939  (!$this->isAdministrationObject($type) || $a_incl_adm)) {
940  $rbactypes[] = $type;
941  }
942  }
943 
944  return $rbactypes ? $rbactypes : array();
945  }
$type
isAllowedInRepository($a_obj_name)
checks if object type can be used in repository context
isAdministrationObject($a_obj_name)
Check if administration object.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getClassName()

ilObjectDefinition::getClassName (   $a_obj_name)

get class name by type

Parameters
stringobject type public

Definition at line 245 of file class.ilObjectDefinition.php.

246  {
247  return $this->obj_data[$a_obj_name]["class_name"];
248  }

◆ getComponentForType()

static ilObjectDefinition::getComponentForType (   $a_obj_type)
static

Get component for object type.

Definition at line 858 of file class.ilObjectDefinition.php.

References $DIC, $ilDB, and array.

859  {
860  global $DIC;
861 
862  $ilDB = $DIC->database();
863 
864  $set = $ilDB->queryF(
865  "SELECT component FROM il_object_def WHERE id = %s",
866  array("text"),
867  array($a_obj_type)
868  );
869 
870  if ($rec = $ilDB->fetchAssoc($set)) {
871  return $rec["component"];
872  }
873 
874  return "";
875  }
global $DIC
Definition: saml.php:7
Create styles array
The data for the language used.
global $ilDB

◆ getCreatableSubObjects()

ilObjectDefinition::getCreatableSubObjects (   $a_obj_type,
  $a_context = self::MODE_REPOSITORY,
  $a_parent_ref_id = null 
)

get only creatable subobjects by type

Parameters
stringobject type
integercontext
integerparent_ref_id public
Returns
array list of createable object types

Definition at line 656 of file class.ilObjectDefinition.php.

References $sub_types, $type, ilObjStudyProgramme\getCreatableSubObjects(), getDevMode(), getSubObjects(), isAdministrationObject(), isAllowedInRepository(), isAllowedInWorkspace(), and isSystemObject().

657  {
658  $subobjects = $this->getSubObjects($a_obj_type);
659 
660  // remove role folder object from list
661  unset($subobjects["rolf"]);
662 
663  $sub_types = array_keys($subobjects);
664 
665  // remove object types in development from list
666  foreach ($sub_types as $type) {
667  if ($this->getDevMode($type) || $this->isSystemObject($type)) {
668  unset($subobjects[$type]);
669  }
670  if ($a_context == self::MODE_REPOSITORY && !$this->isAllowedInRepository($type)) {
671  unset($subobjects[$type]);
672  }
673  if ($a_context == self::MODE_WORKSPACE && !$this->isAllowedInWorkspace($type)) {
674  unset($subobjects[$type]);
675  }
676  if ($a_context == self::MODE_ADMINISTRATION && !$this->isAdministrationObject($type)) {
677  unset($subobjects[$type]);
678  }
679  }
680 
681  if ($a_obj_type == "prg") {
682  // ask study program which objects are allowed to create on the concrete node.
683  require_once("Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php");
684  return ilObjStudyProgramme::getCreatableSubObjects($subobjects, $a_parent_ref_id);
685  }
686 
687  return $subobjects;
688  }
$type
isAllowedInRepository($a_obj_name)
checks if object type can be used in repository context
isAdministrationObject($a_obj_name)
Check if administration object.
isSystemObject($a_obj_name)
checks if object type is a system object
getSubObjects($a_obj_type, $a_filter=true)
get all subobjects by type
static getCreatableSubObjects($a_subobjects, $a_ref_id)
Filter the list of possible subobjects for the objects that actually could be created on a concrete n...
getDevMode($a_obj_name)
get devmode status by type
isAllowedInWorkspace($a_obj_name)
checks if object type can be used in workspace context
+ Here is the call graph for this function:

◆ getDevMode()

ilObjectDefinition::getDevMode (   $a_obj_name)

get devmode status by type

Parameters
stringobject type public

Definition at line 341 of file class.ilObjectDefinition.php.

Referenced by getCreatableSubObjects(), getDevModeAll(), and getSubObjectsRecursively().

342  {
343  return (bool) $this->obj_data[$a_obj_name]["devmode"];
344  }
+ Here is the caller graph for this function:

◆ getDevModeAll()

ilObjectDefinition::getDevModeAll ( )

get all object types in devmode

public

Returns
array object types set to development

Definition at line 352 of file class.ilObjectDefinition.php.

References $type, array, and getDevMode().

353  {
354  $types = array_keys($this->obj_data);
355 
356  foreach ($types as $type) {
357  if ($this->getDevMode($type)) {
358  $devtypes[] = $type;
359  }
360  }
361 
362  return $devtypes ? $devtypes : array();
363  }
$type
Create styles array
The data for the language used.
getDevMode($a_obj_name)
get devmode status by type
+ Here is the call graph for this function:

◆ getExplorerContainerTypes()

ilObjectDefinition::getExplorerContainerTypes ( )

Get all object types which are defined as container in an explorer context.

Returns
array

Definition at line 1085 of file class.ilObjectDefinition.php.

References $res, $type, array, getGroupOfObj(), getSubObjectsRecursively(), and isContainer().

1086  {
1087  $res = $grp_map = $cnt_grp = array();
1088 
1089  // all repository object types
1090  foreach ($this->getSubObjectsRecursively("root") as $rtype) {
1091  $type = $rtype["name"];
1092 
1093  // obsolete
1094  if ($type == "rolf") {
1095  continue;
1096  }
1097 
1098  // gather group data
1099  $type_grp = $this->getGroupOfObj($type);
1100  if ($type_grp) {
1101  $grp_map[$type_grp][] = $type;
1102  }
1103 
1104  // add basic container types
1105  if ($this->isContainer($type)) {
1106  // add to cnt_grp
1107  if ($type_grp) {
1108  $cnt_grp[] = $type_grp;
1109  }
1110 
1111  $res[] = $type;
1112  }
1113  }
1114 
1115  // add complete groups (cat => rcat, catr; crs => rcrs, crsr; ...)
1116  foreach ($cnt_grp as $grp) {
1117  $res = array_merge($res, $grp_map[$grp]);
1118  }
1119 
1120  // add very special case
1121  // outcommented, see bug #25662
1122  // $res[] = "itgr";
1123 
1124  return array_unique($res);
1125  }
$type
getGroupOfObj($a_obj_name)
Get Group of object type.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
getSubObjectsRecursively($a_obj_type, $a_include_source_obj=true, $a_add_admin_objects=false)
Get all subobjects by type.
isContainer($a_obj_name)
Check if object type is container ('crs','fold','grp' ...)
+ Here is the call graph for this function:

◆ getGroup()

ilObjectDefinition::getGroup (   $a_id)

Get Group information.

Definition at line 265 of file class.ilObjectDefinition.php.

266  {
267  return $this->obj_group[$a_id];
268  }

◆ getGroupedPluginObjectTypes()

static ilObjectDefinition::getGroupedPluginObjectTypes (   $grouped_obj,
  $component,
  $slotName,
  $slotId 
)
staticprotected
Parameters
$grouped_obj
$component
$slotName
$slotId
$plugin_id
Returns
mixed

Definition at line 217 of file class.ilObjectDefinition.php.

References $DIC, array, and ilPlugin\lookupIdForName().

218  {
219  global $DIC;
220 
221  $ilPluginAdmin = $DIC["ilPluginAdmin"];
222  $pl_names = $ilPluginAdmin->getActivePluginsForSlot($component, $slotName, $slotId);
223  foreach ($pl_names as $pl_name) {
224  include_once("./Services/Component/classes/class.ilPlugin.php");
225  $pl_id = ilPlugin::lookupIdForName($component, $slotName, $slotId, $pl_name);
226  if (!isset($grouped_obj[$pl_id])) {
227  $grouped_obj[$pl_id] = array(
228  "pos" => "99992000", // "unassigned" group
229  "objs" => array(0 => $pl_id)
230  );
231  }
232  }
233  return $grouped_obj;
234  }
global $DIC
Definition: saml.php:7
static lookupIdForName($a_ctype, $a_cname, $a_slot_id, $a_plugin_name)
Lookup id for name.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getGroupedRepositoryObjectTypes()

static ilObjectDefinition::getGroupedRepositoryObjectTypes (   $a_parent_obj_type)
static
Parameters
$a_parent_obj_type
Returns
array

Definition at line 881 of file class.ilObjectDefinition.php.

References $DIC, $ilDB, $ret, array, ilDBConstants\FETCHMODE_ASSOC, ilCachedComponentData\getInstance(), IL_COMP_MODULE, IL_COMP_SERVICE, and ilUtil\sortArray().

882  {
883  global $DIC;
884 
885  $ilDB = $DIC->database();
886 
887  $set = $ilDB->query("SELECT * FROM il_object_group");
888  $groups = array();
889  while ($gr_rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) {
890  $groups[$gr_rec["id"]] = $gr_rec;
891  }
892 
893  $global_cache = ilCachedComponentData::getInstance();
894 
895  $recs = $global_cache->lookupGroupedRepObj($a_parent_obj_type);
896 
897  $grouped_obj = array();
898  foreach ((array) $recs as $rec) {
899  if ($rec["grp"] != "") {
900  $grouped_obj[$rec["grp"]]["pos"] = (int) $groups[$rec["grp"]]["default_pres_pos"];
901  $grouped_obj[$rec["grp"]]["objs"][] = $rec["id"];
902  } else {
903  $grouped_obj[$rec["id"]]["pos"] = (int) $rec["default_pres_pos"];
904  $grouped_obj[$rec["id"]]["objs"][] = $rec["id"];
905  }
906  }
907  // now get objects from repository plugin
908  $grouped_obj = self::getGroupedPluginObjectTypes($grouped_obj, IL_COMP_SERVICE, "Repository", "robj");
909  $grouped_obj = self::getGroupedPluginObjectTypes($grouped_obj, IL_COMP_MODULE, "OrgUnit", "orguext");
910 
911  $ret = ilUtil::sortArray($grouped_obj, "pos", "asc", true, true);
912  return $ret;
913  }
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
global $DIC
Definition: saml.php:7
const IL_COMP_MODULE
Create styles array
The data for the language used.
global $ilDB
$ret
Definition: parser.php:6
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ getGroupOfObj()

ilObjectDefinition::getGroupOfObj (   $a_obj_name)

Get Group of object type.

Definition at line 273 of file class.ilObjectDefinition.php.

Referenced by getExplorerContainerTypes().

274  {
275  return $this->obj_data[$a_obj_name]["group"];
276  }
+ Here is the caller graph for this function:

◆ getLocation()

ilObjectDefinition::getLocation (   $a_obj_name)

get location by type

Parameters
stringobject type public

Definition at line 257 of file class.ilObjectDefinition.php.

258  {
259  return $this->obj_data[$a_obj_name]["location"];
260  }

◆ getLTIProviderTypes()

ilObjectDefinition::getLTIProviderTypes ( )

Get object types which offer lti provider support.

Returns
string[] $types

Definition at line 1029 of file class.ilObjectDefinition.php.

References $type.

1030  {
1031  $types = [];
1032  foreach ($this->obj_data as $type => $object_info) {
1033  if ($object_info['lti_provider']) {
1034  $types[] = $type;
1035  }
1036  }
1037  return $types;
1038  }
$type

◆ getOrgUnitPermissionTypes()

ilObjectDefinition::getOrgUnitPermissionTypes ( )

Get object type with orgunit position permission support.

Returns
string[] $types

Definition at line 1014 of file class.ilObjectDefinition.php.

References $type.

Referenced by isOrgUnitPermissionType().

1015  {
1016  $types = [];
1017  foreach ($this->obj_data as $type => $object_info) {
1018  if ($object_info['orgunit_permissions']) {
1019  $types[] = $type;
1020  }
1021  }
1022  return $types;
1023  }
$type
+ Here is the caller graph for this function:

◆ getPlugins()

ilObjectDefinition::getPlugins ( )

Get plugin object info.

Returns
type

Definition at line 1069 of file class.ilObjectDefinition.php.

References $type, array, and isPlugin().

1070  {
1071  $plugins = array();
1072  foreach ((array) $this->obj_data as $type => $pl_data) {
1073  if ($this->isPlugin($type)) {
1074  $plugins[$type] = $pl_data;
1075  }
1076  }
1077  return $plugins;
1078  }
$type
Create styles array
The data for the language used.
isPlugin($a_obj_name)
get RBAC status by type returns true if object type is an (activated) plugin type ...
+ Here is the call graph for this function:

◆ getPositionByType()

ilObjectDefinition::getPositionByType (   $a_type)

Get Position By Object Type.

Parameters
$a_type
Returns
int

Definition at line 1056 of file class.ilObjectDefinition.php.

References $a_type, $ilSetting, and $settings.

1057  {
1059 
1060  return ($ilSetting->get("obj_add_new_pos_" . $a_type) > 0)
1061  ? (int) $ilSetting->get("obj_add_new_pos_" . $a_type)
1062  : (int) $this->obj_data[$a_type]["default_pos"];
1063  }
$a_type
Definition: workflow.php:92
global $ilSetting
Definition: privfeed.php:17

◆ getRepositoryObjectTypesForComponent()

static ilObjectDefinition::getRepositoryObjectTypesForComponent (   $a_component_type,
  $a_component_name 
)
static

Get all repository object types of component.

Definition at line 831 of file class.ilObjectDefinition.php.

References $DIC, $ilDB, and array.

834  {
835  global $DIC;
836 
837  $ilDB = $DIC->database();
838 
839  $set = $ilDB->queryF(
840  "SELECT * FROM il_object_def WHERE component = %s",
841  array("text"),
842  array($a_component_type . "/" . $a_component_name)
843  );
844 
845  $types = array();
846  while ($rec = $ilDB->fetchAssoc($set)) {
847  if ($rec["system"] != 1) {
848  $types[] = $rec;
849  }
850  }
851 
852  return $types;
853  }
global $DIC
Definition: saml.php:7
Create styles array
The data for the language used.
global $ilDB

◆ getSubObjects()

ilObjectDefinition::getSubObjects (   $a_obj_type,
  $a_filter = true 
)

get all subobjects by type

Parameters
stringobject type
booleanfilter disabled objects? (default: true) public
Returns
array list of allowed object types

Definition at line 504 of file class.ilObjectDefinition.php.

References $data, $ilSetting, $settings, __filterObjects(), array, and ilUtil\sortArray().

Referenced by getCreatableSubObjects(), and getSubObjectsRecursively().

505  {
507 
508  $subs = array();
509 
510  if ($subobjects = $this->obj_data[$a_obj_type]["subobjects"]) {
511  // Filter some objects e.g chat object are creatable if chat is active
512  if ($a_filter) {
513  $this->__filterObjects($subobjects);
514  }
515  foreach ($subobjects as $data => $sub) {
516  if ($sub["module"] != "n") {
517  if (!($ilSetting->get("obj_dis_creation_" . $data))) {
518  $subs[$data] = $sub;
519 
520  // determine position
521  $pos = ($ilSetting->get("obj_add_new_pos_" . $data) > 0)
522  ? (int) $ilSetting->get("obj_add_new_pos_" . $data)
523  : (int) $this->obj_data[$data]["default_pos"];
524  $subs[$data]["pos"] = $pos;
525  }
526  }
527  }
528 
529  $subs2 = ilUtil::sortArray($subs, "pos", 'ASC', true, true);
530 
531  return $subs2;
532  }
533 
534  return $subs;
535  }
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubObjectsAsString()

ilObjectDefinition::getSubObjectsAsString (   $a_obj_type)

get a string of all subobjects by type

Parameters
stringobject type public

Definition at line 696 of file class.ilObjectDefinition.php.

References $data.

697  {
698  $string = "";
699 
700  if (is_array($this->obj_data[$a_obj_type]["subobjects"])) {
701  $data = array_keys($this->obj_data[$a_obj_type]["subobjects"]);
702 
703  $string = "'" . implode("','", $data) . "'";
704  }
705 
706  return $string;
707  }

◆ getSubObjectsRecursively()

ilObjectDefinition::getSubObjectsRecursively (   $a_obj_type,
  $a_include_source_obj = true,
  $a_add_admin_objects = false 
)

Get all subobjects by type.

This function returns all subobjects allowed by the provided object type and all its subobject types recursively.

This function is used to create local role templates. It is important, that we do not filter out any objects here!

Parameters
stringobject type public
Returns
array list of allowed object types

Definition at line 550 of file class.ilObjectDefinition.php.

References $data, $ilSetting, $settings, $type, array, getDevMode(), getSubObjects(), isRBACObject(), and ilUtil\sortArray().

Referenced by getExplorerContainerTypes().

551  {
553 
554  // This associative array is used to collect all subobject types.
555  // key=>type, value=data
556  $recursivesubs = array();
557 
558  // This array is used to keep track of the object types, we
559  // need to call function getSubobjects() for.
560  $to_do = array($a_obj_type);
561 
562  // This array is used to keep track of the object types, we
563  // have called function getSubobjects() already. This is to
564  // prevent endless loops, for object types that support
565  // themselves as subobject types either directly or indirectly.
566  $done = array();
567 
568  while (count($to_do) > 0) {
569  $type = array_pop($to_do);
570  $done[] = $type;
571 
572  // no recovery folder subitems
573  if ($type == 'recf') {
574  continue;
575  }
576 
577  // Hide administration if desired
578  if (!$a_add_admin_objects and $type == 'adm') {
579  $subs = array();
580  } else {
581  $subs = $this->getSubObjects($type);
582  }
583  #vd('xxxxxxxxxxxxx'.$type);
584  foreach ($subs as $subtype => $data) {
585  #vd('------------------------->'.$subtype);
586 
587  // Hide role templates and folder from view
588  if ($this->getDevMode($subtype) or !$this->isRBACObject($subtype)) {
589  continue;
590  }
591  if ($subtype == 'rolt') {
592  continue;
593  }
594  if (!$a_add_admin_objects and $subtype == 'adm') {
595  continue;
596  }
597 
598  $recursivesubs[$subtype] = $data;
599  if (!in_array($subtype, $done)
600  && !in_array($subtype, $to_do)) {
601  $to_do[] = $subtype;
602  }
603  }
604  }
605 
606  if ($a_include_source_obj) {
607  if (!isset($recursivesubs[$a_obj_type])) {
608  $recursivesubs[$a_obj_type]['name'] = $a_obj_type;
609  $recursivesubs[$a_obj_type]['lng'] = $a_obj_type;
610  $recursivesubs[$a_obj_type]['max'] = 0;
611  $recursivesubs[$a_obj_type]['pos'] = -1;
612  }
613  }
614  return ilUtil::sortArray($recursivesubs, "pos", 'ASC', true, true);
615  }
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
$type
getSubObjects($a_obj_type, $a_filter=true)
get all subobjects by type
Create styles array
The data for the language used.
getDevMode($a_obj_name)
get devmode status by type
global $ilSetting
Definition: privfeed.php:17
isRBACObject($a_obj_name)
get RBAC status by type returns true if object type is a RBAC object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubobjectsToFilter()

ilObjectDefinition::getSubobjectsToFilter (   $a_obj_type = "adm")

get all subjects except (rolf) of the adm object This is necessary for filtering these objects in role perm view.

e.g It it not necessary to view/edit role permission for the usrf object since it's not possible to create a new one

Parameters
stringobject type public
Returns
array list of object types to filter

Definition at line 627 of file class.ilObjectDefinition.php.

References $key, and array.

628  {
629  foreach ($this->obj_data[$a_obj_type]["subobjects"] as $key => $value) {
630  switch ($key) {
631  case "rolf":
632  case "orgu":
633  // DO NOTHING
634  break;
635 
636  default:
637  $tmp_subs[] = $key;
638  }
639  }
640  // ADD adm and root object
641  $tmp_subs[] = "adm";
642  #$tmp_subs[] = "root";
643 
644  return $tmp_subs ? $tmp_subs : array();
645  }
Create styles array
The data for the language used.
$key
Definition: croninfo.php:18

◆ getTranslationType()

ilObjectDefinition::getTranslationType (   $a_obj_name)

get translation type (sys, db or 0)s

Parameters
stringobject type public

Definition at line 295 of file class.ilObjectDefinition.php.

References $DIC, $ilDB, and ilDBConstants\FETCHMODE_ASSOC.

296  {
297  global $DIC;
298 
299  $ilDB = $DIC->database();
300 
301  if ($a_obj_name == "root") {
302  if (!isset($this->root_trans_type)) {
303  $q = "SELECT count(obj_id) cnt FROM object_translation WHERE obj_id = " .
304  $ilDB->quote(ROOT_FOLDER_ID, 'integer') . " ";
305  $set = $ilDB->query($q);
306  $rec = $set->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
307  if ($rec["cnt"] > 0) {
308  $this->root_trans_type = "db";
309  } else {
310  $this->root_trans_type = $this->obj_data[$a_obj_name]["translate"];
311  }
312  }
313  return $this->root_trans_type;
314  }
315 
316  if (isset($this->obj_data[$a_obj_name])) {
317  return $this->obj_data[$a_obj_name]["translate"];
318  }
319 
320  return "";
321  }
global $DIC
Definition: saml.php:7
global $ilDB

◆ handlerBeginTag()

ilObjectDefinition::handlerBeginTag (   $a_xml_parser,
  $a_name,
  $a_attribs 
)

start tag handler

Parameters
ressouceinternal xml_parser_handler
stringelement tag name
arrayelement attributes private

Definition at line 748 of file class.ilObjectDefinition.php.

749  {
750  switch ($a_name) {
751  case 'object':
752  $this->parent_tag_name = $a_attribs["name"];
753  break;
754  case 'property':
755  $this->current_tag = "property";
756  $this->current_tag_name = $a_attribs["name"];
757 // $this->obj_data[$this->parent_tag_name]["properties"][$this->current_tag_name]["name"] = $a_attribs["name"];
758  $this->obj_data[$this->parent_tag_name]["properties"][$this->current_tag_name]["module"] = $a_attribs["module"];
759 //echo '<br>$this->obj_data["'.$this->parent_tag_name.'"]["properties"]["'.$this->current_tag_name.'"]["module"] = "'.$a_attribs["module"].'";';
760  break;
761  }
762  }

◆ handlerCharacterData()

ilObjectDefinition::handlerCharacterData (   $a_xml_parser,
  $a_data 
)

end tag handler

Parameters
ressouceinternal xml_parser_handler
stringdata private

Definition at line 771 of file class.ilObjectDefinition.php.

772  {
773  }

◆ handlerEndTag()

ilObjectDefinition::handlerEndTag (   $a_xml_parser,
  $a_name 
)

end tag handler

Parameters
ressouceinternal xml_parser_handler
stringelement tag name private

Definition at line 782 of file class.ilObjectDefinition.php.

783  {
784  $this->current_tag = '';
785  $this->current_tag_name = '';
786  }

◆ hasCheckbox()

ilObjectDefinition::hasCheckbox (   $a_obj_name)

should the object get a checkbox (needed for 'cut','copy' ...)

Parameters
stringobject type public

Definition at line 284 of file class.ilObjectDefinition.php.

285  {
286  return (bool) $this->obj_data[$a_obj_name]["checkbox"];
287  }

◆ hasLocalRoles()

ilObjectDefinition::hasLocalRoles (   $a_obj_type)

Check whether the creation of local roles is allowed Currently disabled for type "root" and "adm".

Returns

Definition at line 485 of file class.ilObjectDefinition.php.

486  {
487  switch ($a_obj_type) {
488  case 'root':
489  return false;
490 
491  default:
492  return true;
493  }
494  }

◆ isActivePluginType()

ilObjectDefinition::isActivePluginType (   $type)

Returns true iff the given type is an active type of a repositoryObject or Organisation Unit Extension plugin.

Parameters
$type
Returns
bool

Definition at line 405 of file class.ilObjectDefinition.php.

References $plugin_admin, $type, IL_COMP_MODULE, IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

406  {
407  $ilPluginAdmin = $this->plugin_admin;
408  $isRepoPlugin = $ilPluginAdmin->isActive(
410  "Repository",
411  "robj",
412  ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $type)
413  );
414  $isOrguPlugin = $ilPluginAdmin->isActive(
416  "OrgUnit",
417  "orguext",
418  ilPlugin::lookupNameForId(IL_COMP_MODULE, "OrgUnit", "orguext", $type)
419  );
420  return $isRepoPlugin || $isOrguPlugin;
421  }
$type
static lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.
const IL_COMP_MODULE
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ isAdministrationObject()

ilObjectDefinition::isAdministrationObject (   $a_obj_name)

Check if administration object.

Parameters
string$a_obj_name
Returns
bool

Definition at line 965 of file class.ilObjectDefinition.php.

Referenced by getAllRepositoryTypes(), and getCreatableSubObjects().

966  {
967  return (bool) $this->obj_data[$a_obj_name]['administration'];
968  }
+ Here is the caller graph for this function:

◆ isAllowedInRepository()

ilObjectDefinition::isAllowedInRepository (   $a_obj_name)

checks if object type can be used in repository context

Parameters
stringobject type public
Returns
bool

Definition at line 922 of file class.ilObjectDefinition.php.

Referenced by getAllRepositoryTypes(), and getCreatableSubObjects().

923  {
924  return (bool) $this->obj_data[$a_obj_name]["repository"];
925  }
+ Here is the caller graph for this function:

◆ isAllowedInWorkspace()

ilObjectDefinition::isAllowedInWorkspace (   $a_obj_name)

checks if object type can be used in workspace context

Parameters
stringobject type public
Returns
bool

Definition at line 955 of file class.ilObjectDefinition.php.

Referenced by getCreatableSubObjects().

956  {
957  return (bool) $this->obj_data[$a_obj_name]["workspace"];
958  }
+ Here is the caller graph for this function:

◆ isContainer()

ilObjectDefinition::isContainer (   $a_obj_name)

Check if object type is container ('crs','fold','grp' ...)

public

Parameters
stringobject type
Returns
bool

Definition at line 717 of file class.ilObjectDefinition.php.

Referenced by getExplorerContainerTypes().

718  {
719  if (!is_array($this->obj_data[$a_obj_name]['subobjects'])) {
720  return false;
721  }
722  return count($this->obj_data[$a_obj_name]['subobjects']) >= 1 ? true : false;
723  }
+ Here is the caller graph for this function:

◆ isInactivePlugin()

ilObjectDefinition::isInactivePlugin (   $a_type)

Check whether type belongs to inactive plugin.

Parameters

Definition at line 976 of file class.ilObjectDefinition.php.

References $a_type, and isPlugin().

977  {
978  if (substr($a_type, 0, 1) == "x" && !$this->isPlugin($a_type)) {
979  return true;
980  }
981  return false;
982  }
$a_type
Definition: workflow.php:92
isPlugin($a_obj_name)
get RBAC status by type returns true if object type is an (activated) plugin type ...
+ Here is the call graph for this function:

◆ isOrgUnitPermissionType()

ilObjectDefinition::isOrgUnitPermissionType (   $a_obj_type)

Check if object type offers orgunit position support.

Parameters
string$obj_type
Returns
bool

Definition at line 1045 of file class.ilObjectDefinition.php.

References getOrgUnitPermissionTypes().

1046  {
1047  return in_array($a_obj_type, $this->getOrgUnitPermissionTypes());
1048  }
getOrgUnitPermissionTypes()
Get object type with orgunit position permission support.
+ Here is the call graph for this function:

◆ isPlugin()

ilObjectDefinition::isPlugin (   $a_obj_name)

get RBAC status by type returns true if object type is an (activated) plugin type

Parameters
stringobject type public

Definition at line 384 of file class.ilObjectDefinition.php.

Referenced by getPlugins(), and isInactivePlugin().

385  {
386  return (bool) isset($this->obj_data[$a_obj_name]["plugin"]);
387  }
+ Here is the caller graph for this function:

◆ isPluginTypeName()

ilObjectDefinition::isPluginTypeName (   $a_str)

Check if given type is a plugin type name (starts with an "x")

Parameters
stringobject type public

Definition at line 395 of file class.ilObjectDefinition.php.

396  {
397  return (substr($a_str, 0, 1) == "x");
398  }

◆ isRBACObject()

ilObjectDefinition::isRBACObject (   $a_obj_name)

get RBAC status by type returns true if object type is a RBAC object type

Parameters
stringobject type public

Definition at line 372 of file class.ilObjectDefinition.php.

Referenced by getAllRBACObjects(), and getSubObjectsRecursively().

373  {
374  return (bool) $this->obj_data[$a_obj_name]["rbac"];
375  }
+ Here is the caller graph for this function:

◆ isSideBlock()

ilObjectDefinition::isSideBlock (   $a_obj_name)

Check, whether object type is a side block.

Parameters
stringobject type
Returns
boolean side block true/false

Definition at line 823 of file class.ilObjectDefinition.php.

824  {
825  return (bool) $this->obj_data[$a_obj_name]["sideblock"];
826  }

◆ isSystemObject()

ilObjectDefinition::isSystemObject (   $a_obj_name)

checks if object type is a system object

system objects are those object types that are only used for internal purposes and to keep the object type model consistent. Typically they are used in the administation, exist only once and may contain only specific object types. To mark an object type as a system object type, use 'system=1' in the object definition in objects.xml

Parameters
stringobject type public

Definition at line 812 of file class.ilObjectDefinition.php.

Referenced by getCreatableSubObjects().

813  {
814  return (bool) $this->obj_data[$a_obj_name]["system"];
815  }
+ Here is the caller graph for this function:

◆ parsePluginData()

ilObjectDefinition::parsePluginData (   $component,
  $slotName,
  $slotId,
  $isInAdministration 
)
protected

loads a single plugin definition into the object definition

Parameters
$componentThe component e.g. IL_COMP_SERVICE
$slotNameThe Slot name, e.g. Repository
$slotIdthe slot id, e.g. robj
$isInAdministration,canthe object be created in the administration?

Definition at line 1145 of file class.ilObjectDefinition.php.

References $plugin_admin, ilPlugin\_getDirectory(), array, ilObjectPlugin\getRepoPluginObjectByType(), and ilPlugin\lookupIdForName().

Referenced by readPluginData().

1146  {
1147  $ilPluginAdmin = $this->plugin_admin;
1148  $pl_names = $ilPluginAdmin->getActivePluginsForSlot($component, $slotName, $slotId);
1149  foreach ($pl_names as $pl_name) {
1150  include_once("./Services/Component/classes/class.ilPlugin.php");
1151  $pl_id = ilPlugin::lookupIdForName($component, $slotName, $slotId, $pl_name);
1152  if ($pl_id != "" && !isset($this->obj_data[$pl_id])) {
1153  include_once("./Services/Repository/classes/class.ilRepositoryObjectPlugin.php");
1154  $loc = ilPlugin::_getDirectory($component, $slotName, $slotId, $pl_name) . "/classes";
1155  // The plugin_id is the same as the type_id in repository object plugins.
1157 
1158  $this->obj_data[$pl_id] = array(
1159  "name" => $pl_id,
1160  "class_name" => $pl_name,
1161  "plugin" => "1",
1162  "location" => $loc,
1163  "checkbox" => "1",
1164  "inherit" => "0",
1165  "component" => "",
1166  "translate" => "0",
1167  "devmode" => "0",
1168  "allow_link" => "1",
1169  "allow_copy" => $pl->allowCopy() ? '1' : '0',
1170  "rbac" => "1",
1171  "group" => null,
1172  "system" => "0",
1173  "default_pos" => "99992000", // "unassigned" group
1174  'repository' => '1',
1175  'workspace' => '0',
1176  'administration' => $isInAdministration?'1':'0',
1177  "sideblock" => "0",
1178  'export' => $ilPluginAdmin->supportsExport($component, $slotName, $slotId, $pl_name)
1179  );
1180  $parent_types = $pl->getParentTypes();
1181  foreach ($parent_types as $parent_type) {
1182  $this->obj_data[$parent_type]["subobjects"][$pl_id] = array("name" => $pl_id, "max" => "", "lng" => $pl_id, "plugin" => true);
1183  }
1184  }
1185  }
1186  }
static lookupIdForName($a_ctype, $a_cname, $a_slot_id, $a_plugin_name)
Lookup id for name.
static getRepoPluginObjectByType($type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin...
Create styles array
The data for the language used.
static _getDirectory($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin directory.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readDefinitionData()

ilObjectDefinition::readDefinitionData ( )

Read object definition data.

Definition at line 199 of file class.ilObjectDefinition.php.

References ilGlobalCache\COMP_COMPONENT, ilGlobalCache\getInstance(), readDefinitionDataFromCache(), and readDefinitionDataFromDB().

Referenced by __construct().

200  {
203  } else {
204  $this->readDefinitionDataFromDB();
205  }
206  }
static getInstance($component)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readDefinitionDataFromCache()

ilObjectDefinition::readDefinitionDataFromCache ( )
protected

Definition at line 68 of file class.ilObjectDefinition.php.

References array, ilCachedComponentData\getInstance(), and readPluginData().

Referenced by readDefinitionData().

69  {
70  $this->obj_data = array();
71  $defIds = array();
72  $global_cache = ilCachedComponentData::getInstance();
73  foreach ($global_cache->getIlobjectDef() as $rec) {
74  $this->obj_data[$rec["id"]] = array(
75  "name" => $rec["id"],
76  "class_name" => $rec["class_name"],
77  "location" => $rec["location"],
78  "checkbox" => $rec["checkbox"],
79  "inherit" => $rec["inherit"],
80  "component" => $rec["component"],
81  "translate" => $rec["translate"],
82  "devmode" => $rec["devmode"],
83  "allow_link" => $rec["allow_link"],
84  "allow_copy" => $rec["allow_copy"],
85  "rbac" => $rec["rbac"],
86  "group" => $rec["grp"],
87  "system" => $rec["system"],
88  "default_pos" => "9999" . str_pad($rec["default_pos"], 4, "0", STR_PAD_LEFT), // "unassigned" group
89  "sideblock" => $rec["sideblock"],
90  'export' => $rec['export'],
91  'repository' => $rec['repository'],
92  'workspace' => $rec['workspace'],
93  'administration' => $rec['administration'],
94  'amet' => $rec['amet'],
95  'orgunit_permissions' => $rec['orgunit_permissions'],
96  'lti_provider' => $rec['lti_provider']
97  );
98  $this->obj_data[$rec["id"]]["subobjects"] = array();
99 
100  $defIds[] = $rec["id"];
101  }
102 
103  $subobj = $global_cache->lookupSubObjForParent($defIds);
104 
105  foreach ($subobj as $rec2) {
106  $max = $rec2["mmax"];
107  if ($max <= 0) {
108  $max = "";
109  }
110  $this->obj_data[$rec2["parent"]]["subobjects"][$rec2["subobj"]] = array(
111  "name" => $rec2["subobj"],
112  "max" => $max,
113  "lng" => $rec2["subobj"]
114  );
115  }
116  $this->obj_group = $global_cache->getIlObjectGroup();
117 
118  $this->readPluginData();
119 
120  $this->sub_types = $global_cache->getIlObjectSubType();
121  }
Create styles array
The data for the language used.
readPluginData()
Loads the different plugins into the object definition.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readDefinitionDataFromDB()

ilObjectDefinition::readDefinitionDataFromDB ( )
protected

Definition at line 124 of file class.ilObjectDefinition.php.

References $DIC, $ilDB, array, and readPluginData().

Referenced by readDefinitionData().

125  {
126  global $DIC;
127 
128  $ilDB = $DIC->database();
129 
130  $this->obj_data = array();
131 
132  // Select all object_definitions and collect the definition id's in
133  // this array.
134  $defIds = array();
135  $set = $ilDB->query("SELECT * FROM il_object_def");
136  while ($rec = $ilDB->fetchAssoc($set)) {
137  $this->obj_data[$rec["id"]] = array(
138  "name" => $rec["id"],
139  "class_name" => $rec["class_name"],
140  "location" => $rec["location"],
141  "checkbox" => $rec["checkbox"],
142  "inherit" => $rec["inherit"],
143  "component" => $rec["component"],
144  "translate" => $rec["translate"],
145  "devmode" => $rec["devmode"],
146  "allow_link" => $rec["allow_link"],
147  "allow_copy" => $rec["allow_copy"],
148  "rbac" => $rec["rbac"],
149  "group" => $rec["grp"],
150  "system" => $rec["system"],
151  "default_pos" => "9999" . str_pad($rec["default_pos"], 4, "0", STR_PAD_LEFT), // "unassigned" group
152  "sideblock" => $rec["sideblock"],
153  'export' => $rec['export'],
154  'repository' => $rec['repository'],
155  'workspace' => $rec['workspace'],
156  'administration' => $rec['administration'],
157  'amet' => $rec['amet'],
158  'orgunit_permissions' => $rec['orgunit_permissions'],
159  'lti_provider' => $rec['lti_provider']
160  );
161  $this->obj_data[$rec["id"]]["subobjects"] = array();
162 
163  $defIds[] = $rec["id"];
164  }
165 
166  // get all subobject definitions in a single query
167  $set2 = $ilDB->query("SELECT * FROM il_object_subobj WHERE " . $ilDB->in('parent', $defIds, false, 'text'));
168  while ($rec2 = $ilDB->fetchAssoc($set2)) {
169  $max = $rec2["mmax"];
170  if ($max <= 0) { // for backward compliance
171  $max = "";
172  }
173  $this->obj_data[$rec2["parent"]]["subobjects"][$rec2["subobj"]] = array(
174  "name" => $rec2["subobj"],
175  "max" => $max,
176  "lng" => $rec2["subobj"]
177  );
178  }
179 
180  $set = $ilDB->query("SELECT * FROM il_object_group");
181  $this->obj_group = array();
182  while ($rec = $ilDB->fetchAssoc($set)) {
183  $this->obj_group[$rec["id"]] = $rec;
184  }
185 
186  $this->readPluginData();
187 
188  $set = $ilDB->query("SELECT * FROM il_object_sub_type ");
189  $this->sub_types = array();
190  while ($rec = $ilDB->fetchAssoc($set)) {
191  $this->sub_types[$rec["obj_type"]][] = $rec;
192  }
193  }
global $DIC
Definition: saml.php:7
Create styles array
The data for the language used.
global $ilDB
readPluginData()
Loads the different plugins into the object definition.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readPluginData()

ilObjectDefinition::readPluginData ( )
protected

Loads the different plugins into the object definition.

Definition at line 1132 of file class.ilObjectDefinition.php.

References IL_COMP_MODULE, IL_COMP_SERVICE, and parsePluginData().

Referenced by readDefinitionDataFromCache(), and readDefinitionDataFromDB().

1133  {
1134  $this->parsePluginData(IL_COMP_SERVICE, "Repository", "robj", false);
1135  $this->parsePluginData(IL_COMP_MODULE, "OrgUnit", "orguext", true);
1136  }
const IL_COMP_MODULE
parsePluginData($component, $slotName, $slotId, $isInAdministration)
loads a single plugin definition into the object definition
const IL_COMP_SERVICE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHandlers()

ilObjectDefinition::setHandlers (   $a_xml_parser)

set event handler

Parameters
ressouceinternal xml_parser_handler private

Definition at line 733 of file class.ilObjectDefinition.php.

734  {
735  xml_set_object($a_xml_parser, $this);
736  xml_set_element_handler($a_xml_parser, 'handlerBeginTag', 'handlerEndTag');
737  xml_set_character_data_handler($a_xml_parser, 'handlerCharacterData');
738  }

◆ stopInheritance()

ilObjectDefinition::stopInheritance (   $a_obj_name)

Does object permits stopping inheritance?

Parameters
stringobject type public

Definition at line 330 of file class.ilObjectDefinition.php.

331  {
332  return (bool) $this->obj_data[$a_obj_name]["inherit"];
333  }

Field Documentation

◆ $obj_data

ilObjectDefinition::$obj_data

Definition at line 47 of file class.ilObjectDefinition.php.

◆ $obj_id

ilObjectDefinition::$obj_id

Definition at line 33 of file class.ilObjectDefinition.php.

◆ $parent

ilObjectDefinition::$parent

Definition at line 40 of file class.ilObjectDefinition.php.

◆ $plugin_admin

ilObjectDefinition::$plugin_admin
protected

Definition at line 20 of file class.ilObjectDefinition.php.

Referenced by isActivePluginType(), and parsePluginData().

◆ $settings

ilObjectDefinition::$settings
protected

◆ $sub_types

ilObjectDefinition::$sub_types = array()

◆ MODE_ADMINISTRATION

const ilObjectDefinition::MODE_ADMINISTRATION = 3

Definition at line 53 of file class.ilObjectDefinition.php.

Referenced by ilObjOrgUnitGUI\showPossibleSubObjects().

◆ MODE_REPOSITORY

const ilObjectDefinition::MODE_REPOSITORY = 1

◆ MODE_WORKSPACE


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