Class MatukioHelperUtilsBooking

since 1.0.0
package MatukioEvents

 Methods

Books an event TODO refactor and split up.

book(boolean $frontend = true) : array
Static

. This is a mess - sorry.. old old code from Seminar

Parameters

$frontend

boolean
  • Are we in the frontend

Exceptions

\Exception

Returns

array- Mess..

Change the booking status

changeStatusBooking(array $cid, integer $status = 1, boolean $notifyParticipant = true) : boolean
Static

Parameters

$cid

array
  • The cid

$status

integer
  • The status to which the booking should be changed

$notifyParticipant

boolean
  • Should the participant be notified (by email)

Exceptions

\Exception - DB Error

Returns

boolean

Deletes (Set status) the given bookings

deleteBookings(array $cid) : boolean
Static

Parameters

$cid

array
  • The array of ids

Exceptions

\Exception - DB Error

Returns

boolean

Gets the booking out of the database

getBooking(integer $booking_id, integer $event_id = 0) : mixed
Static

Parameters

$booking_id

integer
  • The booking id

$event_id

integer
  • The event id

Returns

mixed

Get the booking checking QR Code

getBookingCheckinQRCode(string $url, integer $id) : string
Static

Parameters

$url

string
  • The url

$id

integer
  • The booking id

Returns

string

Get booking field value

getBookingFieldValue(array $fields, string $key) : string
Static

Parameters

$fields

array

The fields values

$key

string

The key

Returns

string

Gets the booking id

getBookingId(integer $id) : string
Static

Parameters

$id

integer
  • The id

Returns

string

Gets the booking id barcode

getBookingIdBarcode(integer $id) : string
Static

Parameters

$id

integer
  • The id

Returns

string

Gets the booking id picture

getBookingIdCodePicture(integer $id) : string
Static

Parameters

$id

integer
  • The id

Returns

string

Gets the booking qr code

getBookingIdQRCode(integer $id) : string
Static

Parameters

$id

integer
  • The booking id

Returns

string- The img code

Gets the booking paid text

getBookingPaidName(integer $s = 0) : string
Static

Parameters

$s

integer
  • The booking int (0 = not paid, 1 = paid)

Returns

string

Gets the booking status name

getBookingStatusName(integer $s = 0) : string
Static

Parameters

$s

integer
  • The booking status

Returns

string

Get the booking status select

getBookingStatusSelect(integer $selected) : mixed
Static
since 7.0.0

Parameters

$selected

integer

The current selected status

Returns

mixed

Get the Booking stop select

getBookingStopSelect(integer $selected) : mixed
Static
since 7.0.0

Parameters

$selected

integer

Selected value

Returns

mixed

Gets the code 99 for the given char

getCode99(\char $Asc) : string
Static

Parameters

$Asc

\char
  • A single char

Returns

string

Get the latest booking of a user

getLatestUserBooking(integer $formId, integer $userId) : object | null
Static
since 7.0.0

Parameters

$formId

integer

Form Id for the booking

$userId

integer

User Id

Returns

objectnull

Encodes an text to QR-Code and returns the img including data

getQRCodeIMG(string $encode, integer $width = 150, integer $height = 150) : string
Static

Parameters

$encode

string
  • The text to encode

$width

integer
  • The width

$height

integer
  • The height

Returns

string

Gets the user bookings

getUserBookings(\JUser $user, object $event) : mixed
Static

Parameters

$user

\JUser
  • JUser

$event

object
  • The event

Returns

mixed

Is the user booked

isUserBooked(\JUser $user, object $event, $email = null) : boolean
Static

Parameters

$user

\JUser
  • JUser

$event

object
  • The event

$email

Returns

boolean(false if not booked, true if booked)

 Constants

 

ACTIVE

ACTIVE = 1 
 

ARCHIVED

ARCHIVED = 3 
 

DELETED

DELETED = 4 
 

PAID

PAID = 1 
 

PAID_NOT

PAID_NOT = 0 
 

PENDING

PENDING = 0 
 

REQUIRED_CLASS

REQUIRED_CLASS = " required" 
 

WAITLIST

WAITLIST = 2