| 
    ILIAS
    release_9 Revision v9.13-25-g2c18ec4c24f
    
   | 
  
 Inheritance diagram for ilOrgUnitPermissionDBRepository:
 Collaboration diagram for ilOrgUnitPermissionDBRepository:Public Member Functions | |
| __construct (ilDBInterface $db, ilOrgUnitOperationDBRepository $operationRepo, ilOrgUnitOperationContextDBRepository $contextRepo) | |
| get (int $parent_id, int $position_id) | |
| Get local permission for parent and position If no permission exists yet, it is created from the default setting.  More... | |
| find (int $parent_id, int $position_id) | |
| Find local permission for parent and position Does not create new local permissions, returns null if no local permission exists.  More... | |
| store (ilOrgUnitPermission $permission) | |
| Store permission to db Returns permission with updated fields (see update())  More... | |
| delete (int $parent_id, int $position_id) | |
| Delete local permission for parent and position Returns false if no local permission exists.  More... | |
| update (ilOrgUnitPermission $permission) | |
| Update/refresh the additional fields of the permssion object (e.g.  More... | |
| getLocalorDefault (int $parent_id, int $position_id) | |
| Get an existing local permission.  More... | |
| getDefaultForContext (string $context_name, int $position_id, bool $editable=false) | |
| Get the default setting for a specified context If the setting does not exist, it is created (if permissions are enabled for this context)  More... | |
| getDefaultsForActiveContexts (int $position_id, bool $editable=false) | |
| Get an array of default settings for all active contexts If the settings don't exist yet, they will be created (if permissions are enabled for these contexts)  More... | |
Data Fields | |
| const | TABLE_NAME = 'il_orgu_permissions' | 
Protected Attributes | |
| ilOrgUnitOperationContextDBRepository | $contextRepo | 
| ilDBInterface | $db | 
| ilOrgUnitOperationDBRepository | $operationRepo | 
Private Member Functions | |
| insertDB (ilOrgUnitPermission $permission) | |
| updateDB (ilOrgUnitPermission $permission) | |
| isContextEnabled (string $context) | |
| convertToArray (string $operations) | |
| This will be replaced in a future update including a migration for existing db entries.  More... | |
| convertToJson (array $operations) | |
| This will be replaced in a future update including a migration for existing db entries.  More... | |
Definition at line 22 of file class.ilOrgUnitPermissionDBRepository.php.
| ilOrgUnitPermissionDBRepository::__construct | ( | ilDBInterface | $db, | 
| ilOrgUnitOperationDBRepository | $operationRepo, | ||
| ilOrgUnitOperationContextDBRepository | $contextRepo | ||
| ) | 
Definition at line 29 of file class.ilOrgUnitPermissionDBRepository.php.
References $contextRepo, $db, and $operationRepo.
      
  | 
  private | 
This will be replaced in a future update including a migration for existing db entries.
Definition at line 326 of file class.ilOrgUnitPermissionDBRepository.php.
Referenced by find(), and getDefaultForContext().
 Here is the caller graph for this function:
      
  | 
  private | 
This will be replaced in a future update including a migration for existing db entries.
Definition at line 340 of file class.ilOrgUnitPermissionDBRepository.php.
Referenced by insertDB(), and updateDB().
 Here is the caller graph for this function:| ilOrgUnitPermissionDBRepository::delete | ( | int | $parent_id, | 
| int | $position_id | ||
| ) | 
Delete local permission for parent and position Returns false if no local permission exists.
| ilException | |
| ilPositionPermissionsNotActive | 
Implements OrgUnitPermissionRepository.
Definition at line 170 of file class.ilOrgUnitPermissionDBRepository.php.
References $context, find(), and isContextEnabled().
 Here is the call graph for this function:| ilOrgUnitPermissionDBRepository::find | ( | int | $parent_id, | 
| int | $position_id | ||
| ) | 
Find local permission for parent and position Does not create new local permissions, returns null if no local permission exists.
Implements OrgUnitPermissionRepository.
Definition at line 74 of file class.ilOrgUnitPermissionDBRepository.php.
References $context, $res, convertToArray(), isContextEnabled(), and update().
Referenced by delete(), get(), and getLocalorDefault().
 Here is the call graph for this function:
 Here is the caller graph for this function:| ilOrgUnitPermissionDBRepository::get | ( | int | $parent_id, | 
| int | $position_id | ||
| ) | 
Get local permission for parent and position If no permission exists yet, it is created from the default setting.
| ilException | |
| ilPositionPermissionsNotActive | 
Implements OrgUnitPermissionRepository.
Definition at line 36 of file class.ilOrgUnitPermissionDBRepository.php.
References $context, find(), getDefaultForContext(), isContextEnabled(), and store().
 Here is the call graph for this function:| ilOrgUnitPermissionDBRepository::getDefaultForContext | ( | string | $context_name, | 
| int | $position_id, | ||
| bool | $editable = false  | 
        ||
| ) | 
Get the default setting for a specified context If the setting does not exist, it is created (if permissions are enabled for this context)
Implements OrgUnitPermissionRepository.
Definition at line 250 of file class.ilOrgUnitPermissionDBRepository.php.
References $context, $res, convertToArray(), ilOrgUnitPermission\PARENT_TEMPLATE, store(), and update().
Referenced by get(), getDefaultsForActiveContexts(), and getLocalorDefault().
 Here is the call graph for this function:
 Here is the caller graph for this function:| ilOrgUnitPermissionDBRepository::getDefaultsForActiveContexts | ( | int | $position_id, | 
| bool | $editable = false  | 
        ||
| ) | 
Get an array of default settings for all active contexts If the settings don't exist yet, they will be created (if permissions are enabled for these contexts)
Implements OrgUnitPermissionRepository.
Definition at line 294 of file class.ilOrgUnitPermissionDBRepository.php.
References $context, getDefaultForContext(), and ilOrgUnitGlobalSettings\getInstance().
 Here is the call graph for this function:| ilOrgUnitPermissionDBRepository::getLocalorDefault | ( | int | $parent_id, | 
| int | $position_id | ||
| ) | 
Get an existing local permission.
If a local permission does not exist, return a protected default setting (if permissions are enabled for the context of the parent_id)
| ilException | |
| ilPositionPermissionsNotActive | 
Implements OrgUnitPermissionRepository.
Definition at line 224 of file class.ilOrgUnitPermissionDBRepository.php.
References $context, find(), getDefaultForContext(), and isContextEnabled().
 Here is the call graph for this function:
      
  | 
  private | 
Definition at line 132 of file class.ilOrgUnitPermissionDBRepository.php.
References $id, convertToJson(), ilOrgUnitPermission\getContextId(), ilOrgUnitPermission\getOperations(), ilOrgUnitPermission\getParentId(), ilOrgUnitPermission\getPositionId(), and ilOrgUnitPermission\isProtected().
Referenced by store().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  private | 
Definition at line 311 of file class.ilOrgUnitPermissionDBRepository.php.
References ilOrgUnitGlobalSettings\getInstance().
Referenced by delete(), find(), get(), and getLocalorDefault().
 Here is the call graph for this function:
 Here is the caller graph for this function:| ilOrgUnitPermissionDBRepository::store | ( | ilOrgUnitPermission | $permission | ) | 
Store permission to db Returns permission with updated fields (see update())
Implements OrgUnitPermissionRepository.
Definition at line 114 of file class.ilOrgUnitPermissionDBRepository.php.
References ilOrgUnitPermission\getId(), ilOrgUnitPermission\getParentId(), insertDB(), ilOrgUnitPermission\isProtected(), ilOrgUnitPermission\PARENT_TEMPLATE, update(), updateDB(), and ilOrgUnitPermission\withProtected().
Referenced by get(), and getDefaultForContext().
 Here is the call graph for this function:
 Here is the caller graph for this function:| ilOrgUnitPermissionDBRepository::update | ( | ilOrgUnitPermission | $permission | ) | 
Update/refresh the additional fields of the permssion object (e.g.
available operations)
This is done via the repository cause it also needs data from the operations/context repositories Ideally, this should be private use only but is still needed as public in the current version
Implements OrgUnitPermissionRepository.
Definition at line 204 of file class.ilOrgUnitPermissionDBRepository.php.
References ilOrgUnitPermission\getContextId(), ilOrgUnitPermission\getOperations(), ilOrgUnitPermission\withContext(), ilOrgUnitPermission\withOperations(), ilOrgUnitPermission\withPossibleOperations(), and ilOrgUnitPermission\withSelectedOperationIds().
Referenced by find(), getDefaultForContext(), and store().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  private | 
Definition at line 155 of file class.ilOrgUnitPermissionDBRepository.php.
References convertToJson(), ilOrgUnitPermission\getContextId(), ilOrgUnitPermission\getId(), ilOrgUnitPermission\getOperations(), ilOrgUnitPermission\getParentId(), ilOrgUnitPermission\getPositionId(), and ilOrgUnitPermission\isProtected().
Referenced by store().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  protected | 
Definition at line 25 of file class.ilOrgUnitPermissionDBRepository.php.
Referenced by __construct().
      
  | 
  protected | 
Definition at line 26 of file class.ilOrgUnitPermissionDBRepository.php.
Referenced by __construct().
      
  | 
  protected | 
Definition at line 27 of file class.ilOrgUnitPermissionDBRepository.php.
Referenced by __construct().
| const ilOrgUnitPermissionDBRepository::TABLE_NAME = 'il_orgu_permissions' | 
Definition at line 24 of file class.ilOrgUnitPermissionDBRepository.php.