39 $this->repo = (is_null(
$repo))
44 ?
$DIC->rbac()->review()
51 $this->
access = $DIC->access();
56 $this->repo->addRoleRecommendation($role_id,
$ref_id);
61 $this->repo->removeRoleRecommendation($role_id,
$ref_id);
69 return $this->repo->getRecommendationsOfRoles([$role_id]);
86 $this->repo->removeRecommendationsOfRefId(
$ref_id);
91 $this->repo->removeRecommendationsOfUser(
$user_id);
96 $this->repo->removeRecommendationsOfRole($role_id);
108 $role_ids = $review->assignedRoles(
$user_id);
113 $favourites = $this->fav_manager->getFavouritesOfUser(
$user_id);
114 $favourites_ref_ids = array_column($favourites,
"ref_id");
116 return array_filter($recommendations,
static function ($i) use ($favourites_ref_ids,
$access):
bool {
Manages favourites, currently the interface for other components, needs discussion.
class ilRbacReview Contains Review functions of core Rbac.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getOpenRecommendationsOfUser(int $user_id, array $role_ids)
Open recommendations of user (by role or object, without declined ones)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(?ilRecommendedContentDBRepository $repo=null, ?ilRbacReview $rbacreview=null, ?ilFavouritesManager $fav_manager=null)
ilRecommendedContentDBRepository $repo
removeRecommendationsOfRefId(int $ref_id)
getOpenRecommendationsOfUser(int $user_id)
removeObjectRecommendation(int $user_id, int $ref_id)
removeRecommendationsOfUser(int $user_id)
removeRecommendationsOfRole(int $role_id)
ilFavouritesManager $fav_manager
declineObjectRecommendation(int $user_id, int $ref_id)
addObjectRecommendation(int $user_id, int $ref_id)
addRoleRecommendation(int $role_id, int $ref_id)
removeRoleRecommendation(int $role_id, int $ref_id)
getRecommendationsOfRole(int $role_id)
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)