ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilForumAppEventListener Class Reference

Forum listener. More...

+ Collaboration diagram for ilForumAppEventListener:

Static Protected Attributes

static $ref_ids = array()
 

Private Member Functions

 getCachedReferences ($obj_id)
 

Static Private Member Functions

static delegateNotification (ilObjForumNotificationDataProvider $provider, $notification_type)
 

Detailed Description

Forum listener.

Listens to events of other components.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilForumAppEventListener.php.

Member Function Documentation

◆ delegateNotification()

static ilForumAppEventListener::delegateNotification ( ilObjForumNotificationDataProvider  $provider,
  $notification_type 
)
staticprivate
Parameters
ilObjForumNotificationDataProvider$provider
$notification_type

Definition at line 256 of file class.ilForumAppEventListener.php.

References ilObjForumNotificationDataProvider\getForumNotificationRecipients(), ilObjForumNotificationDataProvider\getPostActivationRecipients(), ilObjForumNotificationDataProvider\getPostAnsweredRecipients(), ilObjForumNotificationDataProvider\getThreadNotificationRecipients(), ilForumMailNotification\TYPE_POST_ACTIVATION, and ilForumMailNotification\TYPE_POST_ANSWERED.

257  {
258  switch($notification_type)
259  {
261  $mailNotification = new ilForumMailNotification($provider);
262  $mailNotification->setType($notification_type);
263  $mailNotification->setRecipients($provider->getPostActivationRecipients());
264  $mailNotification->send();
265  break;
266 
268  $mailNotification = new ilForumMailNotification($provider);
269  $mailNotification->setType($notification_type);
270  $mailNotification->setRecipients($provider->getPostAnsweredRecipients());
271  $mailNotification->send();
272  break;
273 
274  default:
275  // get recipients who wants to get forum notifications
276  $mailNotification = new ilForumMailNotification($provider);
277  $mailNotification->setType($notification_type);
278  $mailNotification->setRecipients($provider->getForumNotificationRecipients());
279  $mailNotification->send();
280 
281  // get recipients who wants to get thread notifications
282  $mailNotification = new ilForumMailNotification($provider);
283  $mailNotification->setType($notification_type);
284  $mailNotification->setRecipients($provider->getThreadNotificationRecipients());
285  $mailNotification->send();
286  break;
287  }
288  }
+ Here is the call graph for this function:

◆ getCachedReferences()

ilForumAppEventListener::getCachedReferences (   $obj_id)
private
Parameters
int$obj_id

Definition at line 243 of file class.ilForumAppEventListener.php.

References ilObject\_getAllReferences().

244  {
245  if(!array_key_exists($obj_id, self::$ref_ids))
246  {
247  self::$ref_ids[$obj_id] = ilObject::_getAllReferences($obj_id);
248  }
249  return self::$ref_ids[$obj_id];
250  }
static _getAllReferences($a_id)
get all reference ids of object
+ Here is the call graph for this function:

Field Documentation

◆ $ref_ids

ilForumAppEventListener::$ref_ids = array()
staticprotected

Definition at line 13 of file class.ilForumAppEventListener.php.


The documentation for this class was generated from the following file: