ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilForumAppEventListener Class Reference

Forum listener. More...

+ Inheritance diagram for ilForumAppEventListener:
+ Collaboration diagram for ilForumAppEventListener:

Static Protected Attributes

static $ref_ids = array()
 

Static Private Member Functions

static getCachedReferences ($obj_id)
 
static delegateNotification (ilObjForumNotificationDataProvider $provider, $notification_type, \ilLogger $logger)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAppEventListener
static handleEvent ($a_component, $a_event, $a_parameter)
 Handle an event in a listener. More...
 

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 14 of file class.ilForumAppEventListener.php.

Member Function Documentation

◆ delegateNotification()

static ilForumAppEventListener::delegateNotification ( ilObjForumNotificationDataProvider  $provider,
  $notification_type,
\ilLogger  $logger 
)
staticprivate
Parameters
ilObjForumNotificationDataProvider$provider
int$notification_type
ilLogger$logger

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

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

359  {
360  switch($notification_type)
361  {
363  $mailNotification = new ilForumMailNotification($provider, $logger);
364  $mailNotification->setType($notification_type);
365  $mailNotification->setRecipients($provider->getPostActivationRecipients());
366  $mailNotification->send();
367  break;
368 
370  $mailNotification = new ilForumMailNotification($provider, $logger);
371  $mailNotification->setType($notification_type);
372  $mailNotification->setRecipients($provider->getPostAnsweredRecipients());
373  $mailNotification->send();
374  break;
375 
376  default:
377  // get recipients who wants to get forum notifications
378  $mailNotification = new ilForumMailNotification($provider, $logger);
379  $mailNotification->setType($notification_type);
380  $mailNotification->setRecipients($provider->getForumNotificationRecipients());
381  $mailNotification->send();
382 
383  // get recipients who wants to get thread notifications
384  $mailNotification = new ilForumMailNotification($provider, $logger);
385  $mailNotification->setType($notification_type);
386  $mailNotification->setRecipients($provider->getThreadNotificationRecipients());
387  $mailNotification->send();
388  break;
389  }
390  }
+ Here is the call graph for this function:

◆ getCachedReferences()

static ilForumAppEventListener::getCachedReferences (   $obj_id)
staticprivate
Parameters
int$obj_id

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

References ilObject\_getAllReferences().

342  {
343  if(!array_key_exists($obj_id, self::$ref_ids))
344  {
345  self::$ref_ids[$obj_id] = ilObject::_getAllReferences($obj_id);
346  }
347  return self::$ref_ids[$obj_id];
348  }
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 16 of file class.ilForumAppEventListener.php.


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