ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
Class ilBuddyList. More...
Public Member Functions | |
reset () | |
Remove the singleton instance from static array, used for unit tests. More... | |
getRepository () | |
setRepository (ilBuddySystemRelationRepository $repository) | |
readFromRepository () | |
getRelations () | |
setRelations (ilBuddySystemRelationCollection $relations) | |
getOwnerId () | |
Returns the user id of the buddy list owner. More... | |
getLinkedRelations () | |
Gets all linked/approved relations. More... | |
getRequestRelationsForOwner () | |
Gets all requested relations the buddy list owner has to interact with. More... | |
getRequestRelationsByOwner () | |
Gets all requested relations the buddy list owner initiated. More... | |
getRequestedRelations () | |
Gets all requested relations. More... | |
getIgnoredRelationsForOwner () | |
Gets all ignored relations the buddy list owner has to interact with. More... | |
getIgnoredRelationsByOwner () | |
Gets all ignored relations the buddy list owner initiated. More... | |
getIgnoredRelations () | |
Gets all ignored relations: ilBuddySystemRelationCollection. More... | |
getRelationUserIds () | |
Returns an array of all user ids the buddy list owner has a relation with. More... | |
setOwnerId (int $ownerId) | |
getRelationByUserId (int $usrId) | |
link (ilBuddySystemRelation $relation) | |
unlink (ilBuddySystemRelation $relation) | |
request (ilBuddySystemRelation $relation) | |
ignore (ilBuddySystemRelation $relation) | |
destroy () | |
Removes all buddy system references of the user (persistently) More... | |
Static Public Member Functions | |
static | getInstanceByUserId (int $usrId) |
static | getInstanceByGlobalUser () |
Protected Member Functions | |
__construct (int $ownerId) | |
ilBuddyList constructor. More... | |
performLazyLoading () | |
getRelationTargetUserId (ilBuddySystemRelation $relation) | |
Protected Attributes | |
$ownerId | |
$relations | |
$repository | |
$relationsRead = false | |
$eventHandler | |
Static Protected Attributes | |
static | $instances = [] |
Class ilBuddyList.
Definition at line 8 of file class.ilBuddyList.php.
|
protected |
ilBuddyList constructor.
int | $ownerId |
Definition at line 65 of file class.ilBuddyList.php.
References $DIC, getOwnerId(), setOwnerId(), and setRepository().
ilBuddyList::destroy | ( | ) |
Removes all buddy system references of the user (persistently)
Definition at line 401 of file class.ilBuddyList.php.
References getRelations(), and getRepository().
ilBuddyList::getIgnoredRelations | ( | ) |
Gets all ignored relations: ilBuddySystemRelationCollection.
Definition at line 219 of file class.ilBuddyList.php.
References getRelations(), and ilBuddySystemRelation\isIgnored().
Referenced by getIgnoredRelationsByOwner(), and getIgnoredRelationsForOwner().
ilBuddyList::getIgnoredRelationsByOwner | ( | ) |
Gets all ignored relations the buddy list owner initiated.
Definition at line 208 of file class.ilBuddyList.php.
References getIgnoredRelations(), getOwnerId(), and ilBuddySystemRelation\getUsrId().
ilBuddyList::getIgnoredRelationsForOwner | ( | ) |
Gets all ignored relations the buddy list owner has to interact with.
Definition at line 197 of file class.ilBuddyList.php.
References ilBuddySystemRelation\getBuddyUsrId(), getIgnoredRelations(), and getOwnerId().
|
static |
ilBuddySystemException |
Definition at line 54 of file class.ilBuddyList.php.
References $DIC.
Referenced by ilBuddySystemLinkButton\__construct(), ilBuddySystemGUI\__construct(), ilContactUserActionProvider\collectActionsForTargetUser(), ilMailingListsGUI\executeCommand(), ilMailSearchCoursesMembersTableGUI\fillRow(), ilAwarenessUserProviderContactRequests\getInitialUserSet(), ilAwarenessUserProviderApprovedContacts\getInitialUserSet(), ILIAS\Contact\Provider\ContactNotificationProvider\getNotifications(), ilUsersGalleryContacts\getRelationSequence(), ilMailingListsGUI\performDeleteMembers(), ilBuddySystemRelationsTableGUI\populate(), ilUsersGalleryGUI\populateTemplate(), ilMailingListsGUI\saveAssignmentForm(), ilMailFormGUI\showForm(), ilMailSearchGroupsGUI\showMembers(), ilMailSearchCoursesGUI\showMembers(), ilMailSearchGUI\showResults(), ilContactGUI\showSubTabs(), ilBuddyListTest\testInstanceCanBeCreatedByGlobalUserObject(), ilBuddyListTest\testInstanceCannotBeCreatedByAnonymousGlobalUserObject(), and ilBuddySystemGUI\transitionCommand().
|
static |
int | $usrId |
ilBuddySystemException |
Definition at line 33 of file class.ilBuddyList.php.
References ilObjUser\_isAnonymous().
Referenced by ilContactAppEventListener\handleEvent(), ilBuddyListTest\testAlreadyGivenStateExceptionIsThrownWhenALinkedRelationShouldBeMarkedAsLinked(), ilBuddyListTest\testAlreadyGivenStateExceptionIsThrownWhenAnIgnoredRelationShouldBeMarkedAsIgnored(), ilBuddyListTest\testAlreadyGivenStateExceptionIsThrownWhenAnUnlinkedRelationShouldBeMarkedAsUnlinked(), ilBuddyListTest\testAlreadyGivenStateExceptionIsThrownWhenARequestedRelationShouldBeMarkedAsRequested(), ilBuddyListTest\testDifferentRelationStatesCanBeRetrieved(), ilBuddyListTest\testInstanceByBeCreatedBySingletonMethod(), ilBuddyListTest\testListIsInitiallyEmpty(), ilBuddyListTest\testRelationCannotBeRequestedForAnonymous(), ilBuddyListTest\testRelationCannotBeRequestedForUnknownUserAccounts(), ilBuddyListTest\testRelationRequestCanBeApprovedByTheRelationTarget(), ilBuddyListTest\testRelationRequestCanBeIgnoredByTheRelationTarget(), ilBuddyListTest\testRelationRequestCannotBeApprovedByTheRelationOwner(), ilBuddyListTest\testRelationRequestCannotBeIgnoredByTheRelationOwner(), ilBuddyListTest\testRepositoryIsEnquiredOnlyOnceToFetchRelationsWhenCalledImplicitly(), ilBuddyListTest\testRepositoryIsEnquiredToFetchRelationsWhenRequestedExplicitly(), ilBuddyListTest\testRepositoryIsEnquiredWhenBuddyListShouldBeDestroyed(), ilBuddyListTest\testStateTransitionExceptionIsThrownWhenALinkedRelationShouldBeMarkedAsIgnored(), ilBuddyListTest\testUnlinkedRelationIsReturnedWhenRelationWasRequestedForAnUnknownBuddyId(), and ilBuddyListTest\testValuesCanBeFetchedByGettersWhenSetBySetters().
ilBuddyList::getLinkedRelations | ( | ) |
Gets all linked/approved relations.
Definition at line 153 of file class.ilBuddyList.php.
References getRelations(), and ilBuddySystemRelation\isLinked().
ilBuddyList::getOwnerId | ( | ) |
Returns the user id of the buddy list owner.
Definition at line 144 of file class.ilBuddyList.php.
References $ownerId.
Referenced by __construct(), getIgnoredRelationsByOwner(), getIgnoredRelationsForOwner(), getRelationByUserId(), getRelationTargetUserId(), getRequestRelationsByOwner(), getRequestRelationsForOwner(), ignore(), link(), and reset().
ilBuddyList::getRelationByUserId | ( | int | $usrId | ) |
int | $usrId |
Definition at line 256 of file class.ilBuddyList.php.
References ilBuddySystemRelationStateFactory\getInstance(), getOwnerId(), and getRelations().
ilBuddyList::getRelations | ( | ) |
Definition at line 123 of file class.ilBuddyList.php.
References $relations, and performLazyLoading().
Referenced by destroy(), getIgnoredRelations(), getLinkedRelations(), getRelationByUserId(), getRelationUserIds(), getRequestedRelations(), ignore(), link(), request(), and unlink().
|
protected |
ilBuddySystemRelation | $relation |
Definition at line 247 of file class.ilBuddyList.php.
References ilBuddySystemRelation\getBuddyUsrId(), getOwnerId(), and ilBuddySystemRelation\getUsrId().
Referenced by ignore(), link(), request(), and unlink().
ilBuddyList::getRelationUserIds | ( | ) |
Returns an array of all user ids the buddy list owner has a relation with.
Definition at line 230 of file class.ilBuddyList.php.
References getRelations().
ilBuddyList::getRepository | ( | ) |
Definition at line 88 of file class.ilBuddyList.php.
References $repository.
Referenced by destroy(), ignore(), link(), readFromRepository(), request(), and unlink().
ilBuddyList::getRequestedRelations | ( | ) |
Gets all requested relations.
Definition at line 186 of file class.ilBuddyList.php.
References getRelations(), and ilBuddySystemRelation\isRequested().
Referenced by getRequestRelationsByOwner(), and getRequestRelationsForOwner().
ilBuddyList::getRequestRelationsByOwner | ( | ) |
Gets all requested relations the buddy list owner initiated.
Definition at line 175 of file class.ilBuddyList.php.
References getOwnerId(), getRequestedRelations(), and ilBuddySystemRelation\getUsrId().
ilBuddyList::getRequestRelationsForOwner | ( | ) |
Gets all requested relations the buddy list owner has to interact with.
Definition at line 164 of file class.ilBuddyList.php.
References ilBuddySystemRelation\getBuddyUsrId(), getOwnerId(), and getRequestedRelations().
ilBuddyList::ignore | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemRelation | $relation |
ilBuddySystemException |
Definition at line 371 of file class.ilBuddyList.php.
References Vendor\Package\$e, getOwnerId(), getRelations(), getRelationTargetUserId(), getRepository(), ilBuddySystemRelation\getUsrId(), ilBuddySystemRelation\ignore(), ilBuddySystemRelation\isIgnored(), and ilBuddySystemRelation\isLinked().
ilBuddyList::link | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemRelation | $relation |
ilBuddySystemException |
Definition at line 278 of file class.ilBuddyList.php.
References Vendor\Package\$e, getOwnerId(), getRelations(), getRelationTargetUserId(), getRepository(), ilBuddySystemRelation\getUsrId(), ilBuddySystemRelation\isLinked(), and ilBuddySystemRelation\link().
|
protected |
Definition at line 112 of file class.ilBuddyList.php.
References readFromRepository().
Referenced by getRelations().
ilBuddyList::readFromRepository | ( | ) |
Definition at line 104 of file class.ilBuddyList.php.
References getRepository(), and setRelations().
Referenced by performLazyLoading().
ilBuddyList::request | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemRelation | $relation |
ilBuddySystemException |
Definition at line 327 of file class.ilBuddyList.php.
References Vendor\Package\$e, ilObjUser\_isAnonymous(), ilObjUser\_lookupLogin(), getRelations(), getRelationTargetUserId(), getRepository(), ilBuddySystemRelation\isRequested(), and ilBuddySystemRelation\request().
ilBuddyList::reset | ( | ) |
Remove the singleton instance from static array, used for unit tests.
Definition at line 78 of file class.ilBuddyList.php.
References getOwnerId().
ilBuddyList::setOwnerId | ( | int | $ownerId | ) |
int | $ownerId |
Definition at line 238 of file class.ilBuddyList.php.
References $ownerId.
Referenced by __construct().
ilBuddyList::setRelations | ( | ilBuddySystemRelationCollection | $relations | ) |
ilBuddySystemRelationCollection | $relations |
Definition at line 135 of file class.ilBuddyList.php.
References $relations.
Referenced by readFromRepository().
ilBuddyList::setRepository | ( | ilBuddySystemRelationRepository | $repository | ) |
ilBuddySystemRelationRepository | $repository |
Definition at line 96 of file class.ilBuddyList.php.
References $repository, and repository().
Referenced by __construct().
ilBuddyList::unlink | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemRelation | $relation |
ilBuddySystemException |
Definition at line 305 of file class.ilBuddyList.php.
References Vendor\Package\$e, getRelations(), getRelationTargetUserId(), getRepository(), ilBuddySystemRelation\isUnlinked(), and ilBuddySystemRelation\unlink().
|
protected |
Definition at line 26 of file class.ilBuddyList.php.
|
staticprotected |
Definition at line 20 of file class.ilBuddyList.php.
|
protected |
Definition at line 11 of file class.ilBuddyList.php.
Referenced by getOwnerId(), and setOwnerId().
|
protected |
Definition at line 14 of file class.ilBuddyList.php.
Referenced by getRelations(), and setRelations().
|
protected |
Definition at line 23 of file class.ilBuddyList.php.
|
protected |
Definition at line 17 of file class.ilBuddyList.php.
Referenced by getRepository(), and setRepository().