EventsService
in package
Tags
Table of Contents
- $activityManager : IManager
- $circlesRequest : DeprecatedCirclesRequest
- $configService : ConfigService
- $eventDispatcher : EventDispatcher
- $membersRequest : DeprecatedMembersRequest
- $miscService : MiscService
- $notificationManager : IManager
- $time : ITimeFactory
- $urlGenerator : IURLGenerator
- $userId : string
- $userManager : IUserManager
- __construct() : mixed
- Events constructor.
- deleteNotification() : mixed
- onCircleCreation() : mixed
- onCircleCreation()
- onCircleDestruction() : mixed
- onCircleDestruction()
- onGroupLevel() : mixed
- onGroupLevel()
- onGroupLink() : mixed
- onGroupLink()
- onGroupUnlink() : mixed
- onGroupUnlink()
- onLinkDown() : mixed
- onLinkDown()
- onLinkRemove() : mixed
- onLinkRemove()
- onLinkRequestAccepted() : mixed
- onLinkRequestAccepted()
- onLinkRequestAccepting() : mixed
- onLinkRequestAccepting()
- onLinkRequestCanceled() : mixed
- onLinkRequestCanceled()
- onLinkRequestReceived() : mixed
- onLinkRequestReceived()
- onLinkRequestRejected() : mixed
- onLinkRequestRejected()
- onLinkRequestSent() : mixed
- onLinkRequestSent()
- onLinkUp() : mixed
- onLinkUp()
- onMemberLeaving() : mixed
- onMemberLeaving()
- onMemberLevel() : mixed
- onMemberLevel()
- onMemberNew() : mixed
- onMemberNew()
- onMemberOwner() : mixed
- onMemberOwner()
- onSettingsChange() : mixed
- onSettingsChange()
- createNotification() : INotification
- dispatch() : mixed
- generateEvent() : IEvent
- generateEvent() Create an Activity Event with the basic settings for the app.
- notificationOnInvitation() : mixed
- notificationOnMemberNew() : mixed
- notificationOnRequest() : mixed
- onMemberAlmost() : mixed
- onMemberAlmost()
- onMemberInvited() : mixed
- onMemberInvited()
- onMemberRequesting() : mixed
- onMemberRequesting()
- publishEvent() : mixed
- Publish the event to the users.
Properties
$activityManager
private
IManager
$activityManager
$circlesRequest
private
DeprecatedCirclesRequest
$circlesRequest
$configService
private
ConfigService
$configService
$eventDispatcher
private
EventDispatcher
$eventDispatcher
$membersRequest
private
DeprecatedMembersRequest
$membersRequest
$miscService
private
MiscService
$miscService
$notificationManager
private
IManager
$notificationManager
$time
private
ITimeFactory
$time
$urlGenerator
private
IURLGenerator
$urlGenerator
$userId
private
string
$userId
$userManager
private
IUserManager
$userManager
Methods
__construct()
Events constructor.
public
__construct(string $userId, ITimeFactory $time, IManager $activityManager, IManager $notificationManager, IUserManager $userManager, IURLGenerator $urlGenerator, EventDispatcher $eventDispatcher, DeprecatedCirclesRequest $circlesRequest, DeprecatedMembersRequest $membersRequest, ConfigService $configService, MiscService $miscService) : mixed
Parameters
- $userId : string
- $time : ITimeFactory
- $activityManager : IManager
- $notificationManager : IManager
- $userManager : IUserManager
- $urlGenerator : IURLGenerator
- $eventDispatcher : EventDispatcher
- $circlesRequest : DeprecatedCirclesRequest
- $membersRequest : DeprecatedMembersRequest
- $configService : ConfigService
- $miscService : MiscService
Return values
mixed —deleteNotification()
public
deleteNotification(string $object, string $objectId) : mixed
Parameters
- $object : string
- $objectId : string
Return values
mixed —onCircleCreation()
onCircleCreation()
public
onCircleCreation(DeprecatedCircle $circle) : mixed
Called when a circle is created. Broadcast an activity to the cloud We won't do anything if the circle is not PUBLIC or CLOSED
Parameters
- $circle : DeprecatedCircle
Return values
mixed —onCircleDestruction()
onCircleDestruction()
public
onCircleDestruction(DeprecatedCircle $circle) : mixed
Called when a circle is destroyed. Broadcast an activity on its members. We won't do anything if the circle is PERSONAL
Parameters
- $circle : DeprecatedCircle
Return values
mixed —onGroupLevel()
onGroupLevel()
public
onGroupLevel(DeprecatedCircle $circle, DeprecatedMember $group) : mixed
Called when a linked group have his level changed. Broadcast an activity to all moderator of the circle, and the group members in case of demotion.
Parameters
- $circle : DeprecatedCircle
- $group : DeprecatedMember
Return values
mixed —onGroupLink()
onGroupLink()
public
onGroupLink(DeprecatedCircle $circle, DeprecatedMember $group) : mixed
Called when a group is linked to a circle. Broadcast an activity to the member of the linked group and to the moderators of the circle. We won't do anything if the circle is PERSONAL
Parameters
- $circle : DeprecatedCircle
- $group : DeprecatedMember
Return values
mixed —onGroupUnlink()
onGroupUnlink()
public
onGroupUnlink(DeprecatedCircle $circle, DeprecatedMember $group) : mixed
Called when a group is unlinked from a circle. Broadcast an activity to the member of the unlinked group and to the moderators of the circle. We won't do anything if the circle is PERSONAL
Parameters
- $circle : DeprecatedCircle
- $group : DeprecatedMember
Return values
mixed —onLinkDown()
onLinkDown()
public
onLinkDown(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a link is closed (usually by remote). Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkRemove()
onLinkRemove()
public
onLinkRemove(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a link is removed. Subject is based on the current status of the Link. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkRequestAccepted()
onLinkRequestAccepted()
public
onLinkRequestAccepted(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a request to generate a link from a remote host is accepted. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkRequestAccepting()
onLinkRequestAccepting()
public
onLinkRequestAccepting(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a link is Up and Running. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkRequestCanceled()
onLinkRequestCanceled()
public
onLinkRequestCanceled(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a request to generate a link from a remote host is dismissed. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkRequestReceived()
onLinkRequestReceived()
public
onLinkRequestReceived(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a request to generate a link from a remote host is received. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkRequestRejected()
onLinkRequestRejected()
public
onLinkRequestRejected(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a request to generate a link from a remote host is dismissed. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkRequestSent()
onLinkRequestSent()
public
onLinkRequestSent(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a request to generate a link with a remote circle is sent. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onLinkUp()
onLinkUp()
public
onLinkUp(DeprecatedCircle $circle, FederatedLink $link) : mixed
Called when a link is Up and Running. Broadcast an activity to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $link : FederatedLink
Return values
mixed —onMemberLeaving()
onMemberLeaving()
public
onMemberLeaving(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Called when a member is removed from a circle. Broadcast an activity to the leaving member and to the moderators of the circle. We won't do anything if the circle is PERSONAL
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —onMemberLevel()
onMemberLevel()
public
onMemberLevel(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Called when a member have his level changed. Broadcast an activity to all moderator of the circle, and the member if he is demoted. If the level is Owner, we identify the event as a Coup d'Etat and we broadcast all members.
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —onMemberNew()
onMemberNew()
public
onMemberNew(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Called when a member is added to a circle. Broadcast an activity to the new member and to the moderators of the circle. We won't do anything if the circle is PERSONAL If the level is still 0, we will redirect to onMemberAlmost and manage the invitation/request from there If the level is Owner, we ignore the event.
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —onMemberOwner()
onMemberOwner()
public
onMemberOwner(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Called when the owner rights of a circle have be given to another member.
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —onSettingsChange()
onSettingsChange()
public
onSettingsChange(DeprecatedCircle $circle[, array<string|int, mixed> $oldSettings = [] ]) : mixed
Called when the circle's settings are changed
Parameters
- $circle : DeprecatedCircle
- $oldSettings : array<string|int, mixed> = []
Return values
mixed —createNotification()
private
createNotification(DeprecatedCircle $circle, DeprecatedMember $author, string $userId, string $subject, string $object, string $objectId) : INotification
Parameters
- $circle : DeprecatedCircle
- $author : DeprecatedMember
- $userId : string
- $subject : string
- $object : string
- $objectId : string
Return values
INotification —dispatch()
private
dispatch(string $context, array<string|int, mixed> $arguments) : mixed
Parameters
- $context : string
- $arguments : array<string|int, mixed>
Return values
mixed —generateEvent()
generateEvent() Create an Activity Event with the basic settings for the app.
private
generateEvent( $type) : IEvent
Parameters
Return values
IEvent —notificationOnInvitation()
private
notificationOnInvitation(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —notificationOnMemberNew()
private
notificationOnMemberNew(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —notificationOnRequest()
private
notificationOnRequest(DeprecatedCircle $circle, DeprecatedMember $author) : mixed
Parameters
- $circle : DeprecatedCircle
- $author : DeprecatedMember
Return values
mixed —onMemberAlmost()
onMemberAlmost()
private
onMemberAlmost(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Called when a member is added to a circle with level=0 Trigger onMemberInvitation() or onMemberInvitationRequest() based on Member Status
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —onMemberInvited()
onMemberInvited()
private
onMemberInvited(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Called when a member is invited to a circle. Broadcast an activity to the invited member and to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —onMemberRequesting()
onMemberRequesting()
private
onMemberRequesting(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Called when a member request an invitation to a private circle. Broadcast an activity to the requester and to the moderators of the circle.
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Return values
mixed —publishEvent()
Publish the event to the users.
private
publishEvent(IEvent $event, array<string|int, mixed> $users) : mixed
Parameters
- $event : IEvent
- $users : array<string|int, mixed>