Class MatukioHelperTemplates

TODO refactor, split and optimize! Think on the kittens!

since 2.2.0
package MatukioEvents

 Methods

Generates the CSV Data

getCSVData(object $template, array $bookings, object $event, object $fields) : string
Static

Parameters

$template

object
  • The template

$bookings

array
  • The bookings

$event

object
  • The event

$fields

object
  • The booking fields

Returns

string

Generates the CSV Header

getCSVHeader(object $template, object $event, object $fields) : mixed
Static

Parameters

$template

object
  • The template

$event

object
  • The event

$fields

object
  • The booking fields

Returns

mixed

Gets the custom field header

getCustomFieldHeader(string $field) : string
Static

Parameters

$field

string

The field data

Returns

string

Generates the E-Mail body

getEmailBody(string $tmpl_name, object $event, object $booking = null, object $cuser = null) : mixed
Static

Parameters

$tmpl_name

string

The name of the Template

$event

object

The event row

$booking

object

The booking row

$cuser

object

The custom user

Exceptions

\Exception

Returns

mixed

Generates The Event info HTML Code

getEmailEventInfoHTML(object $event) : string
Static

Parameters

$event

object
  • The event

Returns

string

Generates the E-Mail Info TEXT

getEmailEventInfoTEXT(object $event) : string
Static

Parameters

$event

object
  • The event

Returns

string

Gets the E-Mail template name on the given id

getEmailTemplateName(integer $art) : string
Static

Parameters

$art

integer
  • The type

Returns

string

Generates the csv booking details

getExportCSVBookingDetails($nrBooked, $bookingValues, object $event, string $separator = ";", object $fields, $delimiter = "'") : string
Static

Parameters

$nrBooked

$bookingValues

$event

object
  • The event

$separator

string
  • The separator

$fields

object
  • The booking fields

$delimiter

Returns

string

Generates the csv booking detail header

getExportCSVBookingDetailsHeader(string $separator = ";", array $fields, $delimiter = "'") : string
Static

Parameters

$separator

string
  • The Separator char

$fields

array
  • The booking fields

$delimiter

Returns

string

Generates the signature header

getExportSignatureHeader(string $signature_line, object $event, object $fields) : mixed
Static

Parameters

$signature_line

string
  • The signature line

$event

object
  • The event

$fields

object
  • The booking fields

Returns

mixed

Get the other person booking details

getOtherPersonBookingDetails(object $booking, array $fieldLabelValuePerPlace) : string
Static
since 7.0.0

Parameters

$booking

object

Booking

$fieldLabelValuePerPlace

array

Label to Field Value per Place

Returns

string

Gets the header cell for this event

getParsedExportTemplateHeadding(object $tmpl, object $event) : mixed
Static

Parameters

$tmpl

object

The not parsed template

$event

object

The event

Returns

mixed

Gets the payment method title out of the plugin!

getPaymentMethodTitle(string $pm) : string
Static

Parameters

$pm

string
  • The payment method

Returns

string

Gets the replacements for the event & (booking)

getReplaces(object $event, object $booking = null, integer $nr = null, object $cuser = null, object $fields = null) : mixed
Static

Parameters

$event

object
  • The event data

$booking

object
  • The booking data

$nr

integer
  • the number

$cuser

object
  • The custom user

$fields

object
  • The booking fields

Returns

mixed

Generates the Header replacements

getReplacesHeader(object $event, boolean $alias = true, object $fields) : mixed
Static

Parameters

$event

object
  • The event

$alias

boolean
  • Also for aliases (duplicate content)

$fields

object
  • THe bookings fields

Returns

mixed

Just returns the template row with the given name

getTemplate(string $tmpl_name) : object
Static

Parameters

$tmpl_name

string

The name of the template

Returns

objecttemplate

Get the XML per place replacement Values

getXMLPerPlaceReplacement(object $booking, array $fields, array $fieldLabelValuePerPlace) : string
Static
since 7.0.0

Parameters

$booking

object

Booking

$fields

array

Fields

$fieldLabelValuePerPlace

array

Label to Field Value per place

Returns

string

Replaces the constants of the template

replaceConstants(object $template, object $event, object $booking = null, object $cuser = null) : mixed
Static

Parameters

$template

object
  • The template (mostly text) with the not replaced place holders

$event

object
  • The event (mandatory)

$booking

object
  • The booking (optional)

$cuser

object
  • The custom user

Returns

mixed

Replaces all language ##XY## place holders

replaceLanguage(object $template) : mixed
Static

Parameters

$template

object
  • The template

Returns

mixed

Replaces all lanugage strings in the given string

replaceLanguageStrings(string $s) : string
Static

Parameters

$s

string
  • The string

Returns

string

Get the placeholder for the email booking as Html

getEmailBookingInfoHtmlPlaceholder(object $event, object $booking, array $fieldLabelValue, array $fieldLabelValuePerPlace) : string
Static
since 7.0.0

Parameters

$event

object

Event

$booking

object

Booking

$fieldLabelValue

array

Field Labels <> Values

$fieldLabelValuePerPlace

array

Field Labels <> Per Place Values

Returns

string

Get the placeholder for the email booking as text

getEmailBookingInfoTextPlaceholder(object $event, object $booking, array $fieldLabelValue, array $fieldLabelValuePerPlace) : string
Static
since 7.0.0

Parameters

$event

object

Event

$booking

object

Booking

$fieldLabelValue

array

Field Labels <> Values

$fieldLabelValuePerPlace

array

Field Labels <> Per Place Values

Returns

string

 Properties

 

$bookedarray

$bookedarray 

Default

null
Static
 

$bookingFields

$bookingFields 

Default

null
Static
 

$bookingFieldsEvent

$bookingFieldsEvent 

Default

0
Static
 

$eventCustomFields

$eventCustomFields 

Default

null
Static
 

$globaldifferentfees

$globaldifferentfees 

Default

null
Static
 

$locationobj

$locationobj 

Default

null
Static
 

$templateobj

$templateobj 

Default

null
Static