getUserEnabledEvents( $this->getUser(), 'web' ); return array( 'tables' => array( 'echo_notification', 'echo_event' ), 'fields' => '*', 'conds' => array( 'notification_user' => $this->getUser()->getId(), 'notification_bundle_base' => 1, 'event_type' => $eventTypes, ), 'options' => array(), 'join_conds' => array( 'echo_event' => array( 'JOIN', 'notification_event=event_id', ), ), ); } public function getNotifications() { if ( !$this->mQueryDone ) { $this->doQuery(); } $notifications = array(); foreach ( $this->mResult as $row ) { $notifications[] = EchoNotification::newFromRow( $row ); } // get rid of the overfetched if ( count( $notifications ) > $this->getLimit() ) { array_pop( $notifications ); } if ( $this->mIsBackwards ) { $notifications = array_reverse( $notifications ); } return $notifications; } function getIndexField() { return 'notification_event'; } }