ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
Recommended content db repository. More...
Public Member Functions | |
__construct (\ilDBInterface $db=null) | |
Constructor. More... | |
addRoleRecommendation (int $role_id, int $ref_id) | |
Add role recommendation. More... | |
removeRoleRecommendation (int $role_id, int $ref_id) | |
Remove role recommendation. More... | |
addObjectRecommendation (int $user_id, int $ref_id) | |
Add object recommendation. More... | |
removeObjectRecommendation (int $user_id, int $ref_id) | |
Remove object recommendation. More... | |
removeRecommendationsOfRefId (int $ref_id) | |
Remove all recommendations of a ref id (role and user/object related) More... | |
removeRecommendationsOfUser (int $user_id) | |
Remove all recommendations of a user. More... | |
removeRecommendationsOfRole (int $role_id) | |
Remove all recommendations of a role. More... | |
declineObjectRecommendation (int $user_id, int $ref_id) | |
Decline object recommendation. More... | |
getRecommendationsOfRoles (array $role_ids) | |
Get recommendations of roles. More... | |
getOpenRecommendationsOfUser (int $user_id, array $role_ids) | |
Open recommendations of user (by role or object, without declined ones) More... | |
Protected Member Functions | |
ifExistsObjectRecommendation (int $user_id, int $ref_id) | |
Does object recommendation exist? More... | |
getUserObjectRecommendations (int $user_id) | |
Get user object recommendations. More... | |
getDeclinedUserObjectRecommendations (int $user_id) | |
Get declined user object recommendations. More... | |
Protected Attributes | |
$db | |
Recommended content db repository.
Table rep_rec_content_obj (A repo object is directly recommended for a user, users can decline recommendations)
Table rep_rec_content_role (A repo object is recommended for users of a role)
Definition at line 19 of file class.ilRecommendedContentDBRepository.php.
ilRecommendedContentDBRepository::__construct | ( | \ilDBInterface | $db = null | ) |
ilRecommendedContentDBRepository::addObjectRecommendation | ( | int | $user_id, |
int | $ref_id | ||
) |
Add object recommendation.
int | $role_id | |
int | $ref_id |
Definition at line 80 of file class.ilRecommendedContentDBRepository.php.
References $db, and ifExistsObjectRecommendation().
ilRecommendedContentDBRepository::addRoleRecommendation | ( | int | $role_id, |
int | $ref_id | ||
) |
Add role recommendation.
int | $role_id | |
int | $ref_id |
Definition at line 44 of file class.ilRecommendedContentDBRepository.php.
References $db.
ilRecommendedContentDBRepository::declineObjectRecommendation | ( | int | $user_id, |
int | $ref_id | ||
) |
Decline object recommendation.
int | $user_id | |
int | $ref_id |
Definition at line 197 of file class.ilRecommendedContentDBRepository.php.
References $db, and ifExistsObjectRecommendation().
|
protected |
Get declined user object recommendations.
int | $user_id |
Definition at line 263 of file class.ilRecommendedContentDBRepository.php.
References $db.
Referenced by getOpenRecommendationsOfUser().
ilRecommendedContentDBRepository::getOpenRecommendationsOfUser | ( | int | $user_id, |
array | $role_ids | ||
) |
Open recommendations of user (by role or object, without declined ones)
int | $user_id | |
int[] | $role_ids |
Definition at line 284 of file class.ilRecommendedContentDBRepository.php.
References $i, getDeclinedUserObjectRecommendations(), getRecommendationsOfRoles(), and getUserObjectRecommendations().
ilRecommendedContentDBRepository::getRecommendationsOfRoles | ( | array | $role_ids | ) |
Get recommendations of roles.
$role_ids | int[] role ids |
Definition at line 227 of file class.ilRecommendedContentDBRepository.php.
References $db.
Referenced by getOpenRecommendationsOfUser().
|
protected |
Get user object recommendations.
int | $user_id |
Definition at line 244 of file class.ilRecommendedContentDBRepository.php.
References $db.
Referenced by getOpenRecommendationsOfUser().
|
protected |
Does object recommendation exist?
Definition at line 174 of file class.ilRecommendedContentDBRepository.php.
References $db.
Referenced by addObjectRecommendation(), and declineObjectRecommendation().
ilRecommendedContentDBRepository::removeObjectRecommendation | ( | int | $user_id, |
int | $ref_id | ||
) |
Remove object recommendation.
int | $user_id | |
int | $ref_id |
Definition at line 98 of file class.ilRecommendedContentDBRepository.php.
References $db.
ilRecommendedContentDBRepository::removeRecommendationsOfRefId | ( | int | $ref_id | ) |
Remove all recommendations of a ref id (role and user/object related)
int | $ref_id |
Definition at line 115 of file class.ilRecommendedContentDBRepository.php.
References $db.
ilRecommendedContentDBRepository::removeRecommendationsOfRole | ( | int | $role_id | ) |
Remove all recommendations of a role.
int | $role_id |
Definition at line 156 of file class.ilRecommendedContentDBRepository.php.
References $db.
ilRecommendedContentDBRepository::removeRecommendationsOfUser | ( | int | $user_id | ) |
Remove all recommendations of a user.
int | $user_id |
Definition at line 139 of file class.ilRecommendedContentDBRepository.php.
References $db.
ilRecommendedContentDBRepository::removeRoleRecommendation | ( | int | $role_id, |
int | $ref_id | ||
) |
Remove role recommendation.
int | $role_id | |
int | $ref_id |
Definition at line 63 of file class.ilRecommendedContentDBRepository.php.
References $db.
|
protected |
Definition at line 24 of file class.ilRecommendedContentDBRepository.php.
Referenced by __construct(), addObjectRecommendation(), addRoleRecommendation(), declineObjectRecommendation(), getDeclinedUserObjectRecommendations(), getRecommendationsOfRoles(), getUserObjectRecommendations(), ifExistsObjectRecommendation(), removeObjectRecommendation(), removeRecommendationsOfRefId(), removeRecommendationsOfRole(), removeRecommendationsOfUser(), and removeRoleRecommendation().