Class ActionViewBase

Description

Base class for booking and viewing bookings

Located in /inc/actions/viewbase.php (line 33)

ActionAction
   |
   --ActionViewBase
Direct descendents
Class Description
ActionBook Make edit or delete a booking
ActionView View a list of instruments so the user can view and make bookings
ActionCalendar View a bookings calendar and make bookings
ActionBookingList View a list of bookings for a given user or instrument in tabular format
Variable Summary
integer $instrument
integer $maxFutureDays
array $row
Method Summary
void ActionViewBase (BumblebeeAuth $auth,  $PDATA, array $pdata)
1 BookingPastNormalCalendar (SimpleDate $date, [ $calcOffset = 0])
void MakeBookingHref ( $date)
void MakeBookingPermitted ( $date)
void mungeInputData ()
void ViewCalendarPermitted ( $offset)
string _calendarViewLink ( $instrument)
void _checkBookingAuth ( $userid)
void _Forbidden ([ $message = null])
void _forbiddenError ( $msg)
string _instrumentNotes ([boolean $footer = true])
string _offset ()
void _UnknownBooking ([ $message = null])
void _UnknownInstrument ([ $message = null])
Variables
integer $instrument (line 36)
  • var: instrument id number being viewed/booked etc

Redefined in descendants as:
integer $maxFutureDays = 0 (line 40)
  • var: maximum number of days into the future that bookings can be made
array $row (line 38)
  • var: row of data representing the database entry for the instrument

Inherited Variables

Inherited from ActionAction

ActionAction::$auth
ActionAction::$DEBUG
ActionAction::$ob_flush_ok
ActionAction::$PD
ActionAction::$PDATA
ActionAction::$readOnly
ActionAction::$stdmessages
Methods
Constructor ActionViewBase (line 49)

Initialising the class

  • return: nothing
void ActionViewBase (BumblebeeAuth $auth,  $PDATA, array $pdata)
  • BumblebeeAuth $auth: Authorisation object
  • array $pdata: extra state data from the call path
  • $PDATA
BookingPastNormalCalendar (line 186)

Check if a date is within the permitted booking period for this user on this instrument.

  • return: if date is within permitted calendar period, returns 0 or number of days (negative) that the booking is beyond the end of the calendar
1 BookingPastNormalCalendar (SimpleDate $date,  $calcOffset)
  • SimpleDate $date: date to be checked
  • $calcOffset
displayInstrumentFooter (line 143)

Display a footer for the page with the instrument comments and who looks after the instrument

void displayInstrumentFooter ()
displayInstrumentHeader (line 116)

Display a heading on the page with the instrument name and location

void displayInstrumentHeader ()
MakeBookingHref (line 207)
void MakeBookingHref ( $date)
  • $date
MakeBookingPermitted (line 215)
void MakeBookingPermitted ( $date)
  • $date
mungeInputData (line 54)
void mungeInputData ()

Redefinition of:
ActionAction::mungeInputData()
Parse the input data sources

Redefined in descendants as:
ViewCalendarPermitted (line 222)
void ViewCalendarPermitted ( $offset)
  • $offset
_calendarViewLink (line 107)

Makes a link back to the current calendar

  • return: URL string for link back to calendar view
string _calendarViewLink ( $instrument)
  • $instrument
_checkBookingAuth (line 62)

Set flags according to the permissions of the logged in user

void _checkBookingAuth ( $userid)
  • $userid
_Forbidden (line 252)
void _Forbidden ([ $message = null])
  • $message
_forbiddenError (line 71)

Polite "go away" message if someone tries to delete a booking that they can't

void _forbiddenError ( $msg)
  • $msg
_instrumentNotes (line 164)

Display the instrument comment in either header or footer as configured

  • return: header/footer to display for notes section
string _instrumentNotes ([boolean $footer = true])
  • boolean $footer: called in the footer
_loadMultiInstrument (line 236)
void _loadMultiInstrument ()
_offset (line 88)

Calculate calendar offset in days

calculates the number of days between the current date and the last date that was selected by the user (in making a booking etc)

  • return: URL string for inclusion in href (examples: '28' '-14')
string _offset ()
_UnknownBooking (line 274)
void _UnknownBooking ([ $message = null])
  • $message
_UnknownInstrument (line 263)
void _UnknownInstrument ([ $message = null])
  • $message

Inherited Methods

Inherited From ActionAction

ActionAction::ActionAction()
ActionAction::delete()
ActionAction::edit()
ActionAction::go()
ActionAction::log()
ActionAction::mungeInputData()
ActionAction::readOnlyError()
ActionAction::reportAction()
ActionAction::select()
ActionAction::_dataCleanse()

Documentation generated on Tue, 06 Mar 2007 10:02:11 +0000 by phpDocumentor 1.3.0