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

BaseInvitation Class Reference
[Base Objects]

Inheritance diagram for BaseInvitation:

MyObject BaseObject MyModule BaseModule List of all members.

Detailed Description

A basic invitation object to handle invitations for a variety of things.

It's designed to handle invitations for events, friendship, groups, etc. It has approve/deny payload hooks and pages to handle them.

Definition at line 9 of file base-invitation.inc.php.

Public Member Functions

 __construct ($id=null, $table= 'invites')
 our constructor!
 getPagesXml ()
 our pages as xml.
 initMainPage ()
 init our main page...
 drawMainPage ()
 draw our main page...
 drawRow ()
 draw our info and links to processing pages.
 drawLine ()
 draw our info and links to processing pages.
 getApproveLink ($text= 'approve')
 gets a link to the approve page.
 getDenyLink ($text= 'deny')
 gets a link to the deny page.
 canDelete ()
 can we delete the invite?
 canView ()
 can we view the invite?
 initViewPage ()
 init our view page.
 drawViewPage ()
 draw our view page...
 initInvitePage ()
 inits our invite page.
 drawInvitePage ()
 draw our invite page.
 createInviteForm ($user)
 creates our invite form.
 invite ($inviteeId, $note=null)
 create an invitation to a user.
 canRespond ()
 tells us if we are allowed to respond to this invitation.
 initApprovePage ()
 do our init for approve.
 drawApprovePage ()
 draw the approve page.
 initDenyPage ()
 do our init for delete.
 drawDenyPage ()
 draw the deny page.
 getCreateFieldsArray ()
 get our default fields for the invitation
 getCreateIndexesArray ()
 get our default keys for the invitation

Protected Member Functions

 getInvitePageXml ()
 this function gets our xml for the invite page.
 getApprovePageXml ()
 this function gets our xml for the approve page.
 getDenyPageXml ()
 this function gets our xml for the deny page.
 getEditPageXml ()
 this function gets our xml for the edit page.
 addInviteFormFields ($form, $object)
 add fields to the invitation form.
 validateInvite ($form)
 does any invite validation.
 invitePost ($form)
 process the invitation form post.
 saveInvite ($inviteeId)
 save our invite after its been posted.
 emailInvite ($note=null)
 email the user that they have received an invite.
 getGroup ()
 this function gets the english name of our group.
 doApprovePayload ()
 do our approval payload.
 doDenyPayload ()
 do our deny payload.


Member Function Documentation

BaseInvitation::__construct id = null,
table = 'invites'
 

our constructor!

Reimplemented from BaseObject.

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

BaseInvitation::addInviteFormFields form,
object
[protected]
 

add fields to the invitation form.

Parameters:
$form the form to add fields to.
$object the user or object we're inviting.

Definition at line 267 of file base-invitation.inc.php.

Referenced by createInviteForm().

BaseInvitation::canDelete  ) 
 

can we delete the invite?

Returns:
if we can delete it or not... admins and inviters only.

Reimplemented from BaseObject.

Definition at line 166 of file base-invitation.inc.php.

BaseInvitation::canRespond  ) 
 

tells us if we are allowed to respond to this invitation.

Returns:
boolean if we can respond or not.

Definition at line 394 of file base-invitation.inc.php.

Referenced by drawViewPage(), initApprovePage(), and initDenyPage().

BaseInvitation::canView  ) 
 

can we view the invite?

Returns:
if we can delete it or not... admins and inviters/invitees only.

Reimplemented from BaseObject.

Definition at line 178 of file base-invitation.inc.php.

BaseInvitation::createInviteForm user  ) 
 

creates our invite form.

Parameters:
$user user object we want to invite.
Returns:
the form object to use

Definition at line 251 of file base-invitation.inc.php.

References addInviteFormFields(), and BaseModule::getUrl().

Referenced by drawInvitePage().

BaseInvitation::doApprovePayload  )  [protected]
 

do our approval payload.

deletes invite and recreates our session w/ data. you'll want to call addBuddy() here or whatnot.

Definition at line 434 of file base-invitation.inc.php.

Referenced by drawApprovePage().

BaseInvitation::doDenyPayload  )  [protected]
 

do our deny payload.

deletes invite and recreates our session w/ data. you probably wont need to add anything, but here it is anyway.

Definition at line 478 of file base-invitation.inc.php.

Referenced by drawDenyPage().

BaseInvitation::drawApprovePage  ) 
 

draw the approve page.

Definition at line 422 of file base-invitation.inc.php.

References doApprovePayload().

BaseInvitation::drawDenyPage  ) 
 

draw the deny page.

Definition at line 466 of file base-invitation.inc.php.

References doDenyPayload().

BaseInvitation::drawInvitePage  ) 
 

draw our invite page.

gives them the note form, etc.

Definition at line 221 of file base-invitation.inc.php.

References createInviteForm(), invitePost(), and validateInvite().

BaseInvitation::drawLine  ) 
 

draw our info and links to processing pages.

Reimplemented from BaseObject.

Definition at line 110 of file base-invitation.inc.php.

References getApproveLink(), getDenyLink(), and getGroup().

Referenced by drawRow(), and drawViewPage().

BaseInvitation::drawMainPage  ) 
 

draw our main page...

recommend stuff.

Reimplemented from BaseModule.

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

BaseInvitation::drawRow  ) 
 

draw our info and links to processing pages.

Reimplemented from BaseObject.

Definition at line 100 of file base-invitation.inc.php.

References drawLine().

BaseInvitation::drawViewPage  ) 
 

draw our view page...

basically link to the responding stuff.

Definition at line 200 of file base-invitation.inc.php.

References canRespond(), and drawLine().

BaseInvitation::emailInvite note = null  )  [protected]
 

email the user that they have received an invite.

Parameters:
$note the note passed in from a form or whatever

Definition at line 338 of file base-invitation.inc.php.

References Config::get(), and getGroup().

Referenced by invite().

BaseInvitation::getApproveLink text = 'approve'  ) 
 

gets a link to the approve page.

Parameters:
$text the text to link to
Returns:
html string of link.

Definition at line 144 of file base-invitation.inc.php.

References BaseModule::getLink().

Referenced by drawLine().

BaseInvitation::getApprovePageXml  )  [protected]
 

this function gets our xml for the approve page.

Definition at line 51 of file base-invitation.inc.php.

Referenced by getPagesXml().

BaseInvitation::getCreateFieldsArray  ) 
 

get our default fields for the invitation

Returns:
a keyed array of field names to create statements for the field.

Reimplemented from BaseObject.

Definition at line 494 of file base-invitation.inc.php.

BaseInvitation::getCreateIndexesArray  ) 
 

get our default keys for the invitation

Returns:
a keyed array of field names to create index statements for the field.

Reimplemented from BaseObject.

Definition at line 515 of file base-invitation.inc.php.

BaseInvitation::getDenyLink text = 'deny'  ) 
 

gets a link to the deny page.

Parameters:
$text the text to link to
Returns:
html string of link.

Definition at line 156 of file base-invitation.inc.php.

References BaseModule::getLink().

Referenced by drawLine().

BaseInvitation::getDenyPageXml  )  [protected]
 

this function gets our xml for the deny page.

Definition at line 63 of file base-invitation.inc.php.

Referenced by getPagesXml().

BaseInvitation::getEditPageXml  )  [protected]
 

this function gets our xml for the edit page.

in this case, removes it.

Reimplemented from BaseObject.

Definition at line 75 of file base-invitation.inc.php.

BaseInvitation::getGroup  )  [protected]
 

this function gets the english name of our group.

Returns:
the name as a string

Definition at line 384 of file base-invitation.inc.php.

Referenced by drawLine(), and emailInvite().

BaseInvitation::getInvitePageXml  )  [protected]
 

this function gets our xml for the invite page.

Definition at line 39 of file base-invitation.inc.php.

Referenced by getPagesXml().

BaseInvitation::getPagesXml  ) 
 

our pages as xml.

invitations adds invite, approve, and deny. we also remove edit.

Returns:
xml string data.

Reimplemented from BaseObject.

Definition at line 26 of file base-invitation.inc.php.

References getApprovePageXml(), getDenyPageXml(), and getInvitePageXml().

BaseInvitation::initApprovePage  ) 
 

do our init for approve.

they have to be the invitee to view it.

Definition at line 404 of file base-invitation.inc.php.

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

BaseInvitation::initDenyPage  ) 
 

do our init for delete.

they have to be the invitee to do it.

Definition at line 448 of file base-invitation.inc.php.

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

BaseInvitation::initInvitePage  ) 
 

inits our invite page.

logged in only.

Definition at line 211 of file base-invitation.inc.php.

References BaseModule::assertLogin().

BaseInvitation::initMainPage  ) 
 

init our main page...

invites.

Reimplemented from BaseModule.

Definition at line 83 of file base-invitation.inc.php.

References BaseModule::assertLogin().

BaseInvitation::initViewPage  ) 
 

init our view page.

Definition at line 188 of file base-invitation.inc.php.

References BaseModule::assertLogin().

BaseInvitation::invite inviteeId,
note = null
 

create an invitation to a user.

Parameters:
$inviteeId the id of the user you wish to invite.
$note an optional note to pass along

Definition at line 293 of file base-invitation.inc.php.

References emailInvite(), and saveInvite().

Referenced by invitePost().

BaseInvitation::invitePost form  )  [protected]
 

process the invitation form post.

you should override this to add success text.

Parameters:
form the invitation form object.

Definition at line 310 of file base-invitation.inc.php.

References invite().

Referenced by drawInvitePage().

BaseInvitation::saveInvite inviteeId  )  [protected]
 

save our invite after its been posted.

override to add additional data.

Parameters:
$form the form to get data from.

Definition at line 320 of file base-invitation.inc.php.

References BaseObject::save().

Referenced by invite().

BaseInvitation::validateInvite form  )  [protected]
 

does any invite validation.

for you to hook into. set errors on teh form itself.

Parameters:
$form the form to validate with.

Definition at line 282 of file base-invitation.inc.php.

Referenced by drawInvitePage().


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