public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function genericInit() { $em = OW::getEventManager(); $em->bind(self::EVENT_ALBUM_ADD, array($this, 'albumAdd')); $em->bind(self::EVENT_ALBUM_FIND, array($this, 'albumFind')); $em->bind(self::EVENT_ALBUM_DELETE, array($this, 'albumDelete')); $em->bind(self::EVENT_ENTITY_ALBUMS_FIND, array($this, 'entityAlbumsFind')); $em->bind(self::EVENT_PHOTO_ADD, array($this, 'photoAdd')); $em->bind(self::EVENT_PHOTO_FIND, array($this, 'photoFind')); $em->bind(self::EVENT_PHOTO_DELETE, array($this, 'photoDelete')); $em->bind(self::EVENT_ALBUM_PHOTOS_FIND, array($this, 'albumPhotosFind')); $em->bind(self::EVENT_ENTITY_ALBUMS_COUNT, array($this, 'entityAlbumsCount')); $em->bind(self::EVENT_ENTITY_PHOTOS_FIND, array($this, 'entityPhotosFind')); $em->bind(self::EVENT_ENTITY_PHOTOS_COUNT, array($this, 'entityPhotosCount')); $em->bind(self::EVENT_ENTITY_ALBUMS_DELETE, array($this, 'entityAlbumsDelete')); $em->bind(self::EVENT_INIT_FLOATBOX, array($this, 'initFloatbox')); $em->bind(self::EVENT_GET_PHOTO_VIEW_STATUS, array($this, 'getPhotoViewStatus')); $em->bind('ads.enabled_plugins', array($this, 'adsEnabled')); $em->bind('admin.add_auth_labels', array($this, 'addAuthLabels')); $em->bind(OW_EventManager::ON_USER_UNREGISTER, array($this, 'onUserUnregister')); $em->bind('plugin.privacy.get_action_list', array($this, 'addPrivacyAction')); $em->bind('plugin.privacy.on_change_action_privacy', array($this, 'onChangePrivacy')); $em->bind('notifications.collect_actions', array($this, 'collectNotificationActions')); $em->bind('base_add_comment', array($this, 'notifyOnNewComment')); $em->bind('feed.on_entity_action', array($this, 'feedOnEntityAction')); $em->bind('feed.collect_configurable_activity', array($this, 'feedCollectConfigurableActivity')); $em->bind('feed.collect_privacy', array($this, 'feedCollectPrivacy')); $em->bind('feed.after_comment_add', array($this, 'feedAfterCommentAdd')); $em->bind('feed.after_like_added', array($this, 'feedAfterLikeAdded')); $credits = new PHOTO_CLASS_Credits(); $em->bind('usercredits.on_action_collect', array($credits, 'bindCreditActionsCollect')); $em->bind('usercredits.get_action_key', array($credits, 'getActionKey')); $em->bind('socialsharing.get_entity_info', array($this, 'sosialSharingGetPhotoInfo')); $em->bind(self::EVENT_ON_ALBUM_ADD, array($this, 'onAlbumAdd')); $em->bind(self::EVENT_ON_ALBUM_EDIT, array($this, 'onAlbumEdit')); $em->bind(self::EVENT_BEFORE_ALBUM_DELETE, array($this, 'onBeforeAlbumDelete')); $em->bind(self::EVENT_ON_PHOTO_ADD, array($this, 'onPhotoAdd')); $em->bind(self::EVENT_ON_PHOTO_EDIT, array($this, 'onAfterPhotoEdit')); $em->bind(self::EVENT_BEFORE_PHOTO_DELETE, array($this, 'onBeforePhotoDelete')); $em->bind(self::EVENT_ON_PHOTO_DELETE, array($this, 'onPhotoDelete')); $em->bind(self::EVENT_CREATE_USER_ALBUM, array($this, 'createUserAlbum')); $em->bind(self::EVENT_GET_MAIN_ALBUM, array($this, 'getMainAlbum')); $em->bind(self::EVENT_ADD_SEARCH_DATA, array($this, 'addSearchData')); $em->bind('feed.before_content_add', array($this, 'feedBeforeStatusUpdate')); $em->bind(self::EVENT_BACKGROUND_LOAD_PHOTO, array($this, 'backgroundLoadPhoto')); $em->bind(self::EVENT_ON_PHOTO_CONTENT_UPDATE, array($this, 'onUpdateContent')); PHOTO_CLASS_ContentProvider::getInstance()->init(); }