/**
  * Returns class instance
  *
  * @return UAVATARS_CLASS_NewsfeedBridge
  */
 public static function getInstance()
 {
     if (!isset(self::$classInstance)) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
Beispiel #2
0
 public function init()
 {
     OW::getRouter()->addRoute(new OW_Route('uavatars-admin', 'admin/plugins/uavatars', 'UAVATARS_CTRL_Admin', 'index'));
     if (!OW::getPluginManager()->isPluginActive('photo')) {
         OW::getEventManager()->bind('admin.add_admin_notification', array($this, 'collectAdminNotifications'));
         return;
     }
     OW::getEventManager()->bind(BOL_ContentService::EVENT_UPDATE_INFO, array($this, 'onAvatarUpdate'));
     OW::getEventManager()->bind(BOL_ContentService::EVENT_DELETE, array($this, 'onAvatarDelete'));
     OW::getEventManager()->bind('base.widget_panel.content.top', array($this, "onCollectContent"));
     OW::getEventManager()->bind('base.after_avatar_change', array($this, 'afterAvatarChange'));
     OW::getEventManager()->bind('uavatars.init_for_node', array($this, 'initForNode'));
     UAVATARS_CLASS_NewsfeedBridge::getInstance()->init();
 }