public function clearEventInvitations($eventId) { BOL_InvitationService::getInstance()->deleteInvitationByEntity('event', (int) $eventId); BOL_InvitationService::getInstance()->deleteInvitationByEntity('event-invitation', (int) $eventId); BOL_InvitationService::getInstance()->deleteInvitationByEntity(EVENT_CLASS_InvitationHandler::INVITATION_JOIN, (int) $eventId); $this->eventInviteDao->deleteByEventId($eventId); }
public function findUserListForInvite($eventId, $first, $count, $friendList = array()) { return $this->eventInviteDao->findUserListForInvite($eventId, $first, $count, $friendList); }
/** * @param integer $eventId * @param integer $userId */ public function hideInvitationByUserId($userId) { $query = "UPDATE `" . EVENT_BOL_EventInviteDao::getInstance()->getTableName() . "` SET `displayInvitation` = false \r\n WHERE `" . EVENT_BOL_EventInviteDao::USER_ID . "` = :userId AND `displayInvitation` = true "; return $this->dbo->update($query, array('userId' => (int) $userId)); }
/** * @param integer $userId * @return integer */ public function findDisplayedUserInvitationCount($userId) { $query = "SELECT COUNT(*) AS `count` FROM `" . $this->getTableName() . "` AS `e`\n INNER JOIN `" . EVENT_BOL_EventInviteDao::getInstance()->getTableName() . "` AS `ei` ON ( `e`.`id` = `ei`.`" . EVENT_BOL_EventInviteDao::EVENT_ID . "` )\n WHERE `ei`.`" . EVENT_BOL_EventInviteDao::USER_ID . "` = :userId AND `ei`.`displayInvitation` = true AND " . $this->getTimeClause(false, 'e') . " GROUP BY `e`.`id`"; return $this->dbo->queryForColumn($query, array('userId' => (int) $userId, 'startTime' => time(), 'endTime' => time())); }