Пример #1
0
 /**
  * Returns an instance of class (singleton pattern implementation).
  *
  * @return BASE_CLASS_ContentProvider
  */
 public static function getInstance()
 {
     if (self::$classInstance === null) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
Пример #2
0
 public function genericInit()
 {
     $eventManager = OW::getEventManager();
     $eventManager->bind(BOL_BillingService::EVENT_ON_AFTER_DELIVER_SALE, array($this, 'onAfterBillingDeliverSale'));
     $eventManager->bind(OW_EventManager::ON_USER_LOGIN, array($this, 'onUserLoginSaveStatistics'));
     $eventManager->bind(BOL_ContentService::EVENT_AFTER_ADD, array($this, 'onAfterAdd'));
     $eventManager->bind('base.add_global_lang_keys', array($this, 'onAddGlobalLangs'));
     $eventManager->bind(OW_EventManager::ON_USER_UNREGISTER, array($this, 'onDeleteUserContent'));
     $eventManager->bind(OW_EventManager::ON_USER_LOGIN, array($this, 'onUserLogin'));
     $eventManager->bind(OW_EventManager::ON_USER_LOGOUT, array($this, 'onUserLogout'));
     $eventManager->bind(OW_EventManager::ON_USER_REGISTER, array($this, 'onJoinMandatoryUserApprove'));
     $eventManager->bind(OW_EventManager::ON_USER_EDIT, array($this, 'onUserEditFeed'));
     $eventManager->bind(OW_EventManager::ON_USER_REGISTER, array($this, 'onJoinFeed'));
     $eventManager->bind('feed.after_comment_add', array($this, 'onUserJoinCommentFeed'));
     $eventManager->bind('feed.after_like_added', array($this, 'onLikeUserJoin'));
     $eventManager->bind('feed.after_like_added', array($this, 'onUserAvatarLikeFeed'));
     $eventManager->bind('feed.after_comment_add', array($this, 'onUserAvatarCommentFeed'));
     $eventManager->bind(OW_EventManager::ON_USER_REGISTER, array($this, 'onUserRegisterWelcomeLetter'));
     $eventManager->bind(OW_EventManager::ON_USER_UNREGISTER, array($this, 'onUserUnregisterDeleteDisaproved'));
     $eventManager->bind('notifications.collect_actions', array($this, 'onNotifyActions'));
     $eventManager->bind('base_add_comment', array($this, 'onAddComment'));
     $eventManager->bind(OW_EventManager::ON_USER_UNREGISTER, array($this, 'onUserUnregisterRemovePreference'));
     $eventManager->bind('base.update_entity_items_status', array($this, 'onUpdateEntityItemsStatus'));
     $eventManager->bind(OW_EventManager::ON_USER_UNREGISTER, array($this, 'onDeleteMediaPanelFiles'));
     $eventManager->bind(OW_EventManager::ON_USER_UNREGISTER, array($this, 'clearUserListQueryCache'));
     $eventManager->bind(OW_EventManager::ON_USER_SUSPEND, array($this, 'clearUserListQueryCache'));
     $eventManager->bind(OW_EventManager::ON_USER_SUSPEND, array($this, 'sendSuspendNotification'));
     $eventManager->bind(OW_EventManager::ON_USER_UNSUSPEND, array($this, 'clearUserListQueryCache'));
     $eventManager->bind(OW_EventManager::ON_USER_APPROVE, array($this, 'clearUserListQueryCache'));
     $eventManager->bind(OW_EventManager::ON_USER_DISAPPROVE, array($this, 'clearUserListQueryCache'));
     $eventManager->bind(OW_EventManager::ON_USER_MARK_FEATURED, array($this, 'clearUserListQueryCache'));
     $eventManager->bind(OW_EventManager::ON_USER_UNMARK_FEATURED, array($this, 'clearUserListQueryCache'));
     $eventManager->bind('base.questions_field_get_label', array($this, 'getQuestionLabel'));
     $eventManager->bind('base.before_decorator', array($this, 'onBeforeDecoratorRender'));
     $eventManager->bind('plugin.privacy.get_action_list', array($this, 'onPrivacyAddAction'));
     $eventManager->bind('base.members_only_exceptions', array($this, 'onAddMembersOnlyException'));
     $eventManager->bind('base.password_protected_exceptions', array($this, 'onAddPasswordProtectedExceptions'));
     $eventManager->bind('base.maintenance_mode_exceptions', array($this, 'onAddMaintenanceModeExceptions'));
     $eventManager->bind(OW_EventManager::ON_USER_LOGIN, array($this, 'onUserLoginSetAdminCookie'));
     $eventManager->bind('core.emergency_exit', array($this, 'onEmergencyExit'));
     $eventManager->bind('admin.add_auth_labels', array($this, 'onAddAuthLabels'));
     $eventManager->bind(OW_EventManager::ON_USER_UNREGISTER, array($this, 'onUserUnregisterClearMailQueue'));
     $eventManager->bind('socialsharing.get_entity_info', array($this, 'sosialSharingGetUserInfo'));
     $eventManager->bind(OW_EventManager::ON_USER_REGISTER, array($this, 'setAccountTypeUserRoleOnUserRegister'));
     $eventManager->bind(OW_EventManager::ON_USER_REGISTER, array($this, 'deleteInviteCode'));
     $eventManager->bind('base.before_save_user', array($this, 'setUserRoleOnChangeAccountType'));
     $eventManager->bind('base.questions_field_add_fake_questions', array($this, 'addFakeQuestions'));
     $eventManager->bind(OW_EventManager::ON_JOIN_FORM_RENDER, array($this, 'onInviteMembersProcessJoinForm'));
     $eventManager->bind(BASE_CMP_ModerationToolsWidget::EVENT_COLLECT_CONTENTS, array($this, 'onCollectModerationWidgetContent'));
     $eventManager->bind("base.moderation_tools.collect_menu", array($this, 'onCollectModerationToolsMenu'));
     $eventManager->bind(BOL_ContentService::EVENT_BEFORE_DELETE, array($this, 'deleteEntityFlags'));
     BASE_CLASS_ContentProvider::getInstance()->init();
     $eventManager->bind('base.after_avatar_update', array($this, 'onAfterAvatarUpdate'));
     $eventManager->bind("base.user_list.get_displayed_fields", array($this, 'onGetUserListFields'));
     $eventManager->bind("base.user_list.get_questions", array($this, 'onGetUserListQuestions'));
     $eventManager->bind("base.user_list.get_field_data", array($this, 'onGetUserListFieldValue'));
 }