ReadPermissionSubscriptionObserver Class Reference

Public Member Functions

 init ()
 attachEventsByModelClassName ($modelClassName)
 readPermissionSubscriptionOnAfterOwnerChange (CEvent $event)
 readPermissionSubscriptionOnAfterSave (CEvent $event)
 readPermissionSubscriptionOnAfterDelete (CEvent $event)

Data Fields

 $enabled = true

Detailed Description

Helps manage observation events on various classes. Inspects modules for their primary model and detects if hasReadPermissionsSubscriptionOptimization is present. If it is then it will attempt to add queue jobs on various events to support ReadPermissionsSubscriptionOptimization

Definition at line 43 of file ReadPermissionSubscriptionObserver.php.


Member Function Documentation

init (  ) 

Initialize the observer if enabled. Attaches events to model classes as needed.

Definition at line 54 of file ReadPermissionSubscriptionObserver.php.

attachEventsByModelClassName ( modelClassName  ) 

Given a model class name attach readPermissionsSubscriptionOptimization events to that class. Every model will then invoke the readPermissionsSubscriptionOptimization event.

Parameters:
string $modelClassName

Definition at line 86 of file ReadPermissionSubscriptionObserver.php.

readPermissionSubscriptionOnAfterOwnerChange ( CEvent $  event  ) 

Given a event, perform the onOwnerChange logic for a model ($event->sender)

Parameters:
CEvent $event
Returns:
bool

Definition at line 102 of file ReadPermissionSubscriptionObserver.php.

readPermissionSubscriptionOnAfterSave ( CEvent $  event  ) 
Parameters:
CEvent $event
Returns:
bool

Definition at line 112 of file ReadPermissionSubscriptionObserver.php.

readPermissionSubscriptionOnAfterDelete ( CEvent $  event  ) 
Parameters:
CEvent $event
Returns:
bool

Definition at line 125 of file ReadPermissionSubscriptionObserver.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Jul 21 07:10:28 2017