ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
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 (?ilObjUser $user=null) |
Protected Member Functions | |
__construct (int $ownerId, ?ilAppEventHandler $event_handler=null) | |
performLazyLoading () | |
getRelationTargetUserId (ilBuddySystemRelation $relation) | |
Protected Attributes | |
int | $ownerId |
ilBuddySystemRelationRepository | $repository |
bool | $relationsRead = false |
ilAppEventHandler | $eventHandler |
ilBuddySystemRelationCollection | $relations = null |
Static Protected Attributes | |
static array | $instances = [] |
Class ilBuddyList.
Definition at line 25 of file class.ilBuddyList.php.
|
protected |
Definition at line 67 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 381 of file class.ilBuddyList.php.
References getRelations(), and getRepository().
ilBuddyList::getIgnoredRelations | ( | ) |
Gets all ignored relations: ilBuddySystemRelationCollection.
Definition at line 195 of file class.ilBuddyList.php.
References $relation, and getRelations().
Referenced by getIgnoredRelationsByOwner(), and getIgnoredRelationsForOwner().
ilBuddyList::getIgnoredRelationsByOwner | ( | ) |
Gets all ignored relations the buddy list owner initiated.
Definition at line 185 of file class.ilBuddyList.php.
References $relation, and getIgnoredRelations().
ilBuddyList::getIgnoredRelationsForOwner | ( | ) |
Gets all ignored relations the buddy list owner has to interact with.
Definition at line 175 of file class.ilBuddyList.php.
References $relation, and getIgnoredRelations().
|
static |
Definition at line 56 of file class.ilBuddyList.php.
References $DIC, and getInstanceByUserId().
Referenced by ilBuddySystemGUI\__construct(), ilBuddySystemLinkButton\__construct(), ilContactUserActionProvider\collectActionsForTargetUser(), ilMailingListsGUI\executeCommand(), ilMailSearchObjectMembershipsTableGUI\fillRow(), ilAwarenessUserProviderApprovedContacts\getInitialUserSet(), ilAwarenessUserProviderContactRequests\getInitialUserSet(), ILIAS\Contact\Provider\ContactNotificationProvider\getNotifications(), ilUsersGalleryContacts\getRelationSequence(), ilMailingListsGUI\saveAssignmentFormCommand(), ilMailFormGUI\showForm(), ilMailingListsGUI\showMembersListCommand(), ilMailSearchGUI\showResults(), ilContactGUI\showSubTabs(), ilBuddyListTestCase\testInstanceCanBeCreatedByGlobalUserObject(), ilBuddyListTestCase\testInstanceCannotBeCreatedByAnonymousGlobalUserObject(), and ilContactGUI\updateRelationState().
|
static |
ilBuddySystemException |
Definition at line 39 of file class.ilBuddyList.php.
References ilObjUser\_isAnonymous().
Referenced by getInstanceByGlobalUser(), ilContactAppEventListener\handleEvent(), ilBuddyListTestCase\testAlreadyGivenStateExceptionIsThrownWhenALinkedRelationShouldBeMarkedAsLinked(), ilBuddyListTestCase\testAlreadyGivenStateExceptionIsThrownWhenAnIgnoredRelationShouldBeMarkedAsIgnored(), ilBuddyListTestCase\testAlreadyGivenStateExceptionIsThrownWhenAnUnlinkedRelationShouldBeMarkedAsUnlinked(), ilBuddyListTestCase\testAlreadyGivenStateExceptionIsThrownWhenARequestedRelationShouldBeMarkedAsRequested(), ilBuddyListTestCase\testDifferentRelationStatesCanBeRetrieved(), ilBuddyListTestCase\testInstanceByBeCreatedBySingletonMethod(), ilBuddyListTestCase\testListIsInitiallyEmpty(), ilBuddyListTestCase\testRelationCannotBeRequestedForAnonymous(), ilBuddyListTestCase\testRelationCannotBeRequestedForUnknownUserAccounts(), ilBuddyListTestCase\testRelationRequestCanBeApprovedByTheRelationTarget(), ilBuddyListTestCase\testRelationRequestCanBeIgnoredByTheRelationTarget(), ilBuddyListTestCase\testRelationRequestCannotBeApprovedByTheRelationOwner(), ilBuddyListTestCase\testRelationRequestCannotBeIgnoredByTheRelationOwner(), ilBuddyListTestCase\testRepositoryIsEnquiredOnlyOnceToFetchRelationsWhenCalledImplicitly(), ilBuddyListTestCase\testRepositoryIsEnquiredToFetchRelationsWhenRequestedExplicitly(), ilBuddyListTestCase\testRepositoryIsEnquiredWhenBuddyListShouldBeDestroyed(), ilBuddyListTestCase\testStateTransitionExceptionIsThrownWhenALinkedRelationShouldBeMarkedAsIgnored(), ilBuddyListTestCase\testUnlinkedRelationIsReturnedWhenRelationWasRequestedForAnUnknownBuddyId(), and ilBuddyListTestCase\testValuesCanBeFetchedByGettersWhenSetBySetters().
ilBuddyList::getLinkedRelations | ( | ) |
Gets all linked/approved relations.
Definition at line 135 of file class.ilBuddyList.php.
References $relation, and getRelations().
ilBuddyList::getOwnerId | ( | ) |
Returns the user id of the buddy list owner.
Definition at line 127 of file class.ilBuddyList.php.
References $ownerId.
Referenced by __construct(), getRelationByUserId(), ignore(), link(), and reset().
ilBuddyList::getRelationByUserId | ( | int | $usrId | ) |
Definition at line 221 of file class.ilBuddyList.php.
References $relation, ilBuddySystemRelationStateFactory\getInstance(), getOwnerId(), and getRelations().
ilBuddyList::getRelations | ( | ) |
Definition at line 110 of file class.ilBuddyList.php.
References $relations, and performLazyLoading().
Referenced by destroy(), getIgnoredRelations(), getLinkedRelations(), getRelationByUserId(), getRelationUserIds(), getRequestedRelations(), ignore(), link(), request(), and unlink().
|
protected |
Definition at line 216 of file class.ilBuddyList.php.
References $relation.
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 206 of file class.ilBuddyList.php.
References getRelations().
ilBuddyList::getRepository | ( | ) |
Definition at line 87 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 165 of file class.ilBuddyList.php.
References $relation, and getRelations().
Referenced by getRequestRelationsByOwner(), and getRequestRelationsForOwner().
ilBuddyList::getRequestRelationsByOwner | ( | ) |
Gets all requested relations the buddy list owner initiated.
Definition at line 155 of file class.ilBuddyList.php.
References $relation, and getRequestedRelations().
ilBuddyList::getRequestRelationsForOwner | ( | ) |
Gets all requested relations the buddy list owner has to interact with.
Definition at line 145 of file class.ilBuddyList.php.
References $relation, and getRequestedRelations().
ilBuddyList::ignore | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemException |
Definition at line 344 of file class.ilBuddyList.php.
References Vendor\Package\$e, $relation, getOwnerId(), getRelations(), getRelationTargetUserId(), getRepository(), and ilBuddySystemRelation\getUsrId().
ilBuddyList::link | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemException |
Definition at line 243 of file class.ilBuddyList.php.
References $relation, getOwnerId(), getRelations(), getRelationTargetUserId(), getRepository(), and ilBuddySystemRelation\getUsrId().
|
protected |
Definition at line 102 of file class.ilBuddyList.php.
References readFromRepository().
Referenced by getRelations().
ilBuddyList::readFromRepository | ( | ) |
Definition at line 97 of file class.ilBuddyList.php.
References getRepository(), and setRelations().
Referenced by performLazyLoading().
ilBuddyList::request | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemException |
Definition at line 300 of file class.ilBuddyList.php.
References Vendor\Package\$e, $relation, ilObjUser\_isAnonymous(), ilObjUser\_lookupLogin(), getRelations(), getRelationTargetUserId(), and getRepository().
ilBuddyList::reset | ( | ) |
Remove the singleton instance from static array, used for unit tests.
Definition at line 80 of file class.ilBuddyList.php.
References getOwnerId().
ilBuddyList::setOwnerId | ( | int | $ownerId | ) |
Definition at line 211 of file class.ilBuddyList.php.
References $ownerId.
Referenced by __construct().
ilBuddyList::setRelations | ( | ilBuddySystemRelationCollection | $relations | ) |
Definition at line 119 of file class.ilBuddyList.php.
References $relations.
Referenced by readFromRepository().
ilBuddyList::setRepository | ( | ilBuddySystemRelationRepository | $repository | ) |
Definition at line 92 of file class.ilBuddyList.php.
References $repository, and ILIAS\UI\examples\Deck\repository().
Referenced by __construct().
ilBuddyList::unlink | ( | ilBuddySystemRelation | $relation | ) |
ilBuddySystemException |
Definition at line 272 of file class.ilBuddyList.php.
References Vendor\Package\$e, $relation, getRelations(), getRelationTargetUserId(), and getRepository().
|
protected |
Definition at line 33 of file class.ilBuddyList.php.
|
staticprotected |
Definition at line 28 of file class.ilBuddyList.php.
|
protected |
Definition at line 30 of file class.ilBuddyList.php.
Referenced by getOwnerId(), and setOwnerId().
|
protected |
Definition at line 34 of file class.ilBuddyList.php.
Referenced by getRelations(), and setRelations().
|
protected |
Definition at line 32 of file class.ilBuddyList.php.
|
protected |
Definition at line 31 of file class.ilBuddyList.php.
Referenced by getRepository(), and setRepository().