Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

BaseEvent Class Reference
[Base Objects]

Inheritance diagram for BaseEvent:

MyObject BaseObject MyModule BaseModule List of all members.

Detailed Description

A basic event with dates, guests, etc.

A basic event object for use with the calendar. It has start/end dates, location enabled, etc.

Todo:
add code for creation of guests table

Definition at line 11 of file base-event.inc.php.

Public Member Functions

 __construct ($data=null, $table= 'events', $guestTable= 'event_guests')
 see BaseObject::__construct
 getPagesXml ()
 add in event pages: rsvp, attend, leave
 getEditPageParamXml ()
 extend edit page to allow date to be passed in
 delete ()
 delete the event, also delete guests
 initAttendPage ()
 prep our attend page
 drawAttendPage ()
 draw our attend page...
 createAttendForm ()
 create attend form w/ guest count
 initLeavePage ()
 prep our leave page, for removing yourself from an event.
 drawLeavePage ()
 draw the leave page w/ confirmation form
 createLeaveForm ()
 create the leave confirmation form.
 initRSVPPage ()
 init the RSVP page
 drawRSVPPage ()
 draw the RSVP page w/ form, etc
 createRSVPForm ()
 create the RSVP form w/ commitment and guests
 initUnInvitePage ()
 drawUnInvitePage ()
 createUnInviteForm ($user)
 canInvite ()
 canUnInvite ()
 canAttend ()
 can $me attend an event?
 canLeave ()
 can $me leave the event?
 initInvitePage ()
 drawInvitePage ()
 createInviteForm ()
 isGuest ($userId)
 is the user a guest or not?
 getGuest ($userId)
 get a guests information.
 getGuests ($all=true, $force=false)
 get the guests for the event.
 getGuestCount ($all=true)
 get a count of all our guests
 initEditPage ()
 prep our edit page, add js
 editFormAddFields ($form)
 add fields to our event form
 addContentFields ($form)
 add our content fields to the add/edit form
 addLocationFields ($form)
 add our location fields to the add/edit form
 addPrivacyFields ($form)
 add our privacy fields to the add/edit form
 editFormLoad ($form)
 load our data into the form, also load start/end date
 addGuest ($id, $commitment= 'yes')
 add user as a guest w/ commitment
 inviteGuest ($id)
 removeGuest ($id)
 remove a guest from the event.
 rsvp ($id, $commitment, $guests)
 do the RSVP update
 initViewPage ()
 setup our view page
 addInfoBox ()
 add an info box to the page about event.
 addGuestBox ()
 add a box of guest information to the event
 drawLine ()
 draw a line of info on the event
 drawLocation ($map=false)
 draw the location of the event
 getRssItem ()
 get the event info RSS item
 getPublicData ()
 get data for export via API's and such
 getName ($link=false)
 get the name of our event
 getCreateFieldsArray ()
 get an array of fields in the table that stores the events
 getCreateIndexesArray ()
 get an array of indexes on fields in the alert table

Public Attributes

 $guests = null
 $guestTable = null

Protected Member Functions

 getPotentialGuestList ()
 gets a list of potential guests.
 editPagePostSuccess ($form)
 post-processing, add creator as first guest
 emailInvite ($user)


Member Function Documentation

BaseEvent::__construct data = null,
table = 'events',
guestTable = 'event_guests'
 

see BaseObject::__construct

Parameters:
$guestTable the table to store guests data in

Definition at line 21 of file base-event.inc.php.

BaseEvent::addContentFields form  ) 
 

add our content fields to the add/edit form

Parameters:
the Form object

Definition at line 577 of file base-event.inc.php.

Referenced by editFormAddFields().

BaseEvent::addGuest id,
commitment = 'yes'
 

add user as a guest w/ commitment

Parameters:
$id the user id to add
$commitment the commitment the user has. values: yes / no / maybe

Definition at line 695 of file base-event.inc.php.

References dbExecute().

Referenced by drawAttendPage().

BaseEvent::addGuestBox  ) 
 

add a box of guest information to the event

Definition at line 845 of file base-event.inc.php.

References $s.

BaseEvent::addInfoBox  ) 
 

add an info box to the page about event.

Definition at line 813 of file base-event.inc.php.

References $s.

BaseEvent::addLocationFields form  ) 
 

add our location fields to the add/edit form

Parameters:
the Form object

Definition at line 607 of file base-event.inc.php.

Referenced by editFormAddFields().

BaseEvent::addPrivacyFields form  ) 
 

add our privacy fields to the add/edit form

Parameters:
the Form object

Definition at line 632 of file base-event.inc.php.

Referenced by editFormAddFields().

BaseEvent::canAttend  ) 
 

can $me attend an event?

checks to see if they're not a guest, or if its invite only, etc.

Returns:
boolean result.

Definition at line 359 of file base-event.inc.php.

References BaseObject::canView(), and isGuest().

Referenced by initAttendPage().

BaseEvent::canInvite  ) 
 

Todo:
remove this page

Definition at line 339 of file base-event.inc.php.

References BaseObject::canEdit().

Referenced by initInvitePage().

BaseEvent::canLeave  ) 
 

can $me leave the event?

checks to see if they are attending, etc.

Returns:
boolean result

Definition at line 373 of file base-event.inc.php.

References isGuest().

Referenced by initLeavePage().

BaseEvent::canUnInvite  ) 
 

Todo:
remove this page

Definition at line 347 of file base-event.inc.php.

References BaseObject::canDelete().

Referenced by initUnInvitePage().

BaseEvent::createAttendForm  ) 
 

create attend form w/ guest count

Returns:
a Form object

Definition at line 135 of file base-event.inc.php.

References BaseModule::getUrl().

Referenced by drawAttendPage().

BaseEvent::createInviteForm  ) 
 

Todo:
remove this page

Definition at line 425 of file base-event.inc.php.

References BaseModule::getUrl().

Referenced by drawInvitePage().

BaseEvent::createLeaveForm  ) 
 

create the leave confirmation form.

Returns:
the Form object

Definition at line 189 of file base-event.inc.php.

References BaseModule::getUrl().

Referenced by drawLeavePage().

BaseEvent::createRSVPForm  ) 
 

create the RSVP form w/ commitment and guests

Returns:
the Form object

Definition at line 253 of file base-event.inc.php.

References BaseModule::getUrl().

Referenced by drawRSVPPage().

BaseEvent::createUnInviteForm user  ) 
 

Todo:
remove this page

Definition at line 323 of file base-event.inc.php.

References BaseModule::getUrl().

Referenced by drawUnInvitePage().

BaseEvent::delete  ) 
 

delete the event, also delete guests

Reimplemented from BaseObject.

Definition at line 77 of file base-event.inc.php.

References dbExecute().

BaseEvent::drawAttendPage  ) 
 

draw our attend page...

with guest form too

Definition at line 107 of file base-event.inc.php.

References addGuest(), createAttendForm(), Util::redirect(), and rsvp().

BaseEvent::drawInvitePage  ) 
 

Todo:
remove this page

Definition at line 398 of file base-event.inc.php.

References $guests, createInviteForm(), inviteGuest(), and Util::redirect().

BaseEvent::drawLeavePage  ) 
 

draw the leave page w/ confirmation form

Definition at line 170 of file base-event.inc.php.

References createLeaveForm(), Util::redirect(), and removeGuest().

BaseEvent::drawLine  ) 
 

draw a line of info on the event

Reimplemented from BaseObject.

Definition at line 912 of file base-event.inc.php.

BaseEvent::drawLocation map = false  ) 
 

draw the location of the event

Parameters:
$map show a map link or not?
Todo:
make this function do something real.

Definition at line 926 of file base-event.inc.php.

BaseEvent::drawRSVPPage  ) 
 

draw the RSVP page w/ form, etc

Definition at line 224 of file base-event.inc.php.

References createRSVPForm(), Util::redirect(), and rsvp().

BaseEvent::drawUnInvitePage  ) 
 

Todo:
remove this page

Definition at line 294 of file base-event.inc.php.

References createUnInviteForm(), Util::redirect(), and removeGuest().

BaseEvent::editFormAddFields form  ) 
 

add fields to our event form

See also:
BaseObject::editFormAddFields()

Reimplemented from BaseObject.

Definition at line 558 of file base-event.inc.php.

References addContentFields(), addLocationFields(), and addPrivacyFields().

BaseEvent::editFormLoad form  ) 
 

load our data into the form, also load start/end date

Parameters:
the Form object

Reimplemented from BaseObject.

Definition at line 655 of file base-event.inc.php.

BaseEvent::editPagePostSuccess form  )  [protected]
 

post-processing, add creator as first guest

Parameters:
the Form object

Reimplemented from BaseObject.

Definition at line 679 of file base-event.inc.php.

BaseEvent::emailInvite user  )  [protected]
 

Todo:
move this to event invite module

Definition at line 766 of file base-event.inc.php.

References Config::get().

BaseEvent::getCreateFieldsArray  ) 
 

get an array of fields in the table that stores the events

Returns:
an array of field definitions with keys that are the same as the field name.

Reimplemented from BaseObject.

Definition at line 989 of file base-event.inc.php.

BaseEvent::getCreateIndexesArray  ) 
 

get an array of indexes on fields in the alert table

Returns:
a keyed array with keys as the field/index name and values as the index creation sql.

Reimplemented from BaseObject.

Definition at line 1008 of file base-event.inc.php.

BaseEvent::getEditPageParamXml  ) 
 

extend edit page to allow date to be passed in

Reimplemented from BaseObject.

Definition at line 67 of file base-event.inc.php.

BaseEvent::getGuest userId  ) 
 

get a guests information.

Parameters:
$userId the id of the guest to get
Returns:
an array of guest information

Definition at line 487 of file base-event.inc.php.

References $guests, and getGuests().

BaseEvent::getGuestCount all = true  ) 
 

get a count of all our guests

Parameters:
$all do we count all guests, or just confirmed

Definition at line 533 of file base-event.inc.php.

BaseEvent::getGuests all = true,
force = false
 

get the guests for the event.

Parameters:
$all boolean. do we get all guests, or just 'yes' ones
$force do we force it to look it up, or use the stored one if we have it
Returns:
an array of user ids => guest information

Definition at line 500 of file base-event.inc.php.

References dbFetchAssoc(), and dbQuery().

Referenced by getGuest(), and isGuest().

BaseEvent::getName link = false  ) 
 

get the name of our event

Definition at line 977 of file base-event.inc.php.

Referenced by initRSVPPage().

BaseEvent::getPagesXml  ) 
 

add in event pages: rsvp, attend, leave

Todo:
remove invite / uninvite pages. we want to move that to an EventInvitation

Reimplemented from BaseObject.

Definition at line 40 of file base-event.inc.php.

BaseEvent::getPotentialGuestList  )  [protected]
 

gets a list of potential guests.

by default it gets the users friends and removes current guests

Returns:
an array of user ids => user names

Definition at line 454 of file base-event.inc.php.

References isGuest().

BaseEvent::getPublicData  ) 
 

get data for export via API's and such

See also:
BaseObject::getPublicData()

Reimplemented from BaseObject.

Definition at line 954 of file base-event.inc.php.

BaseEvent::getRssItem  ) 
 

get the event info RSS item

Reimplemented from BaseObject.

Definition at line 937 of file base-event.inc.php.

BaseEvent::initAttendPage  ) 
 

prep our attend page

assert login, make sure they can attend, and set the title

Definition at line 92 of file base-event.inc.php.

References BaseModule::assertLogin(), canAttend(), and BaseModule::params().

BaseEvent::initEditPage  ) 
 

prep our edit page, add js

Definition at line 541 of file base-event.inc.php.

References BaseModule::needsJs().

BaseEvent::initInvitePage  ) 
 

Todo:
remove this page

Definition at line 383 of file base-event.inc.php.

References BaseModule::assertLogin(), canInvite(), and BaseModule::params().

BaseEvent::initLeavePage  ) 
 

prep our leave page, for removing yourself from an event.

assert login, check if they can leave, etc.

Definition at line 155 of file base-event.inc.php.

References BaseModule::assertLogin(), canLeave(), and BaseModule::params().

BaseEvent::initRSVPPage  ) 
 

init the RSVP page

assert login, error checking, title, etc.

Definition at line 207 of file base-event.inc.php.

References BaseModule::assertLogin(), getName(), isGuest(), and BaseModule::params().

BaseEvent::initUnInvitePage  ) 
 

Todo:
remove this page

Definition at line 279 of file base-event.inc.php.

References BaseModule::assertLogin(), canUnInvite(), and BaseModule::params().

BaseEvent::initViewPage  ) 
 

setup our view page

Definition at line 792 of file base-event.inc.php.

BaseEvent::inviteGuest id  ) 
 

Todo:
remove this function to event invite

Definition at line 710 of file base-event.inc.php.

Referenced by drawInvitePage().

BaseEvent::isGuest userId  ) 
 

is the user a guest or not?

Parameters:
$userId the id of the user to check
Returns:
boolean result

Definition at line 474 of file base-event.inc.php.

References $guests, and getGuests().

Referenced by canAttend(), canLeave(), getPotentialGuestList(), and initRSVPPage().

BaseEvent::removeGuest id  ) 
 

remove a guest from the event.

Parameters:
$id the id of the user to remove

Definition at line 727 of file base-event.inc.php.

References dbExecute().

Referenced by drawLeavePage(), and drawUnInvitePage().

BaseEvent::rsvp id,
commitment,
guests
 

do the RSVP update

Parameters:
$id the id of the user to rsvp
$commitment the commentment of the user... value: yes/no/maybe
$guests the number of guests they are bringing

Definition at line 745 of file base-event.inc.php.

References dbExecute().

Referenced by drawAttendPage(), and drawRSVPPage().


Member Data Documentation

BaseEvent::$guests = null
 

Definition at line 13 of file base-event.inc.php.

Referenced by drawInvitePage(), getGuest(), and isGuest().

BaseEvent::$guestTable = null
 

Definition at line 14 of file base-event.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:40 2006 for BaseJumper by doxygen 1.3.9.1