39 $this->object_definition =
$GLOBALS[
'DIC'][
'objDefinition'];
51 if (!self::$instance) {
52 self::$instance =
new self();
55 return self::$instance;
69 if (!isset($this->position_settings[$a_obj_type])) {
70 throw new \InvalidArgumentException(
'Object type passed does not support position settings: ' 74 return $this->position_settings[$a_obj_type];
87 if (isset($this->object_position_cache[$a_obj_id])) {
88 return $this->object_position_cache[$a_obj_id];
94 $this->object_position_cache[$a_obj_id] =
false;
99 if (!$type_settings->isActive()) {
100 $this->object_position_cache[$a_obj_id] =
false;
104 if (!$type_settings->isChangeableForObject()) {
105 $this->object_position_cache[$a_obj_id] =
true;
111 if ($object_position->hasObjectSpecificActivation()) {
112 $this->object_position_cache[$a_obj_id] = $object_position->isActive();
114 $this->object_position_cache[$a_obj_id] = (bool) $type_settings->getActivationDefault();
117 return $this->object_position_cache[$a_obj_id];
134 if ($type_settings->isActive()) {
136 $object_setting->setActive($type_settings->getActivationDefault());
137 $object_setting->update();
149 foreach ($this->object_definition->getOrgUnitPermissionTypes() as
$type) {
Stores object activation status of orgunit position settings.
__construct()
Singelton constructor.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
readSettings()
read settings
static getInstance()
Get instance.
saveDefaultPositionActivationStatus($a_obj_id)
Set and save the default activation status according to settings.
static _lookupType($a_id, $a_reference=false)
lookup object type
getObjectPositionSettingsByType($a_obj_type)
Get object position settings by type.
isPositionAccessActiveForObject($a_obj_id)
Check of position access is activate for object.
Object settings regarding position permissions.
Global settings for org units.