Class MatukioHelperRendering

Todo move most things to JLayout..

since 5.0.0
package MatukioEvents

 Methods

Get the location rendering for the academy event detail template TODO move to JLayout

getAcademyLocation(object $event, object $location) : string
Static

Parameters

$event

object
  • The event

$location

object
  • The location

Returns

stringThe html for the template

Get Additional dates Dialog

getAdditionalDatesDialog(object $event, boolean $small = false) : string
Static

Parameters

$event

object
  • The event

$small

boolean
  • Small date format

Returns

string- The html

Get the a between fee

getBetweenFeeText(object $event) : string
Static

Parameters

$event

object
  • The event

Returns

string

Returns the booking button

getBookingButton(object $event, \JUser $user, integer $nrbooked, boolean $isbooked, string $class = "btn btn-primary", $isWaitlist = false) : string
Static

Parameters

$event

object
  • The event

$user

\JUser
  • The juser

$nrbooked

integer
  • Number booked

$isbooked

boolean
  • I the user booked

$class

string
  • The css class (defaults to btn btn-primary)

$isWaitlist

Returns

string- The booking button

Gets the booking details button

getBookingDetailsButton(object $event, \JUser $user) : string
Static

Parameters

$event

object
  • The event

$user

\JUser
  • The user

Returns

string- the html markup for the btn

Get the captcha image

getCaptcha() : string
Static

Returns

string

Gets the category button

getCategoryButtons(array $categories, string $filterCategories) : string
Static

Parameters

$categories

array
  • The categories (array of obj)

$filterCategories

string
  • Coma separated list of active cats

Returns

string- The html

Generates the hidden jquery certificate dialog html

getCertificateDialog() : string
Static

Returns

string- the print dialog

Gets the dialog

getContactDialog(object $event, \JUser $user, object $booking = null, integer $organizerId = 0, boolean $participants = false) : string
Static

Parameters

$event

object
  • The event

$user

\JUser
  • The user

$booking

object
  • The booking

$organizerId

integer
  • The publisher id (if no event

$participants

boolean
  • contact participants?

Exceptions

\Exception on missing recaptcha

Returns

string- The Html

Get the custom fields html output

getCustomFields(object $event, array $customFieldObj) : string
Static

Parameters

$event

object
  • The event

$customFieldObj

array
  • The custom field

Returns

string

Gets the array of options for dateid select

getDatesArray($old = true) : array
Static

Parameters

$old

Returns

array

Gets the event date

getEventDate(object $event, boolean $small = false, boolean $additionalDates = false, boolean $multiLine = false) : string
Static

Parameters

$event

object
  • Event obj

$small

boolean
  • Small display?

$additionalDates

boolean
  • Show Additional dates dialog

$multiLine

boolean
  • Should there be a br element added between the values or a space

Returns

string

Gets the event image

getEventImage(object $event, boolean $detail = false) : string
Static

Parameters

$event

object
  • Event obj

$detail

boolean
  • The detail image?

Returns

string

Gets the event location

getEventLocation(object $event, array $locations) : string
Static

Parameters

$event

object
  • Event obj

$locations

array
  • Locations

Exceptions

\Exception (if location does not exist)

Returns

string

Get the event map

getEventMapHeader(string $gmaploc, boolean $eventpage = false, string $position = null, boolean $scrollwheel = true) : string
Static

Parameters

$gmaploc

string
  • The gmaps address

$eventpage

boolean
  • Are we at the eventpage (default false)

$position

string
  • The position (lat/lng) opt

$scrollwheel

boolean
  • Should the scrollwheel used for google maps?

TODO move to js file

Returns

string

Get event status text

getEventStatusText(object $event, integer $nrbooked, \JUser $user, boolean $isbooked) : string
Static

Parameters

$event

object
  • The event

$nrbooked

integer
  • Number of booked places

$user

\JUser
  • The JUser object

$isbooked

boolean
  • Is the user booked for this event?

Returns

string- Text

Get the ticket table

getEventTicketsTable(object $event, object $bookingInformation) : string
Static

TODO multiple seats and simple fee need move to JLayout too

Parameters

$event

object
  • The event

$bookingInformation

object
  • Object with booking details

Returns

string

Gets the event location

getEventsMap(object $events, array $locations) : string
Static

TODO update to bounds!

Parameters

$events

object
  • Events obj

$locations

array
  • The locations

Exceptions

\Exception (if location does not exist)

Returns

string

Get the fee t ext

getFeeText(object $event) : string
Static

Parameters

$event

object

The event

Returns

stringThe fee text

Gets the array of options for fee select

getFeesArray() : array
Static

Returns

array

Get the files list

getFilesList(object $event, \JUser $user, array $files, boolean $isBooked, array $bookings) : string
Static

Parameters

$event

object
  • The event

$user

\JUser
  • Users

$files

array
  • Array of event files (strange format!)

$isBooked

boolean
  • Is the user booked

$bookings

array
  • Array of bookings (obj)

Returns

string

Return a formated (string) distance with km or miles

getFormatedDistance(double $distance, boolean $isMiles = true) : string
Static
since 7.0.0

Parameters

$distance

double

The distance

$isMiles

boolean

Is it in miles

Returns

string

Gets the gmap location object (gmaploc, lat, lng)

getGmapLocation(object $event, object $locations = null) : object
Static

Parameters

$event

object
  • The event

$locations

object
  • The location

Returns

object- stdclass with gmaploc, lat, lng

Generates the limit select

getLimitSelect(integer $active) : mixed
Static

Parameters

$active

integer
  • The active filter

Returns

mixed

Gets the location button

getLocationButtons(array $locations, string $filterLocations) : string
Static

Parameters

$locations

array
  • The locations (array of obj)

$filterLocations

string
  • Coma separated list of active locations

Returns

string- The html

Gets the event location

getLogin($pwReset = true, $usernameReset = true, $register = true) : string
Static

Parameters

$pwReset

$usernameReset

$register

Returns

string

Gets the navi dates list

getNaviDates(integer $active) : string
Static

Parameters

$active

integer
  • The active date filter (default 1)

Returns

string

Gets the navi fees list

getNaviFees(integer $active) : string
Static

Parameters

$active

integer
  • The active date filter (default 1)

Returns

string

Get the text / string why an event is not bookable

getNotBookableText(\JUser $user, object $event, object $booked, boolean $isBooked) : string
Static

Parameters

$user

\JUser
  • The user

$event

object
  • The event

$booked

object
  • Object with booking informations

$isBooked

boolean
  • Is the user booked

Returns

string- text only

Gets the organizer linked name html

getOrganizer(object $event, array $organizers) : string
Static

Parameters

$event

object
  • The event

$organizers

array
  • Array of organizers (opt - else db query for publisher)

Returns

string

Gets the organizer buttons

getOrganizerButtons(array $organizers, string $filterOrganizers) : string
Static

Parameters

$organizers

array
  • The organizers (array of obj)

$filterOrganizers

string
  • Coma separated list of active organizers

Returns

string- The html

Gets the pagination for the bootstrap 3 template

getPagination(integer $total, integer $limit, integer $limitstart) : string
Static

Parameters

$total

integer
  • Total

$limit

integer
  • The limit

$limitstart

integer
  • Gets the limitstart

Returns

string- The pagination html

Gets the participants button for participants / users / viewers

getParticipantsViewParticipantsButton(object $event, \JUser $user, boolean $isbooked, object $bookingInformation) : string
Static

Parameters

$event

object

The event

$user

\JUser

The user

$isbooked

boolean

The status of the user

$bookingInformation

object

Informations about the booking status (how many etc.)

Returns

string- The html for the button

Generates the hidden jquery print dialog html

getPrintDialog($srcbutton = '.btn-print') : void
Static

Parameters

$srcbutton

Generates the hidden jquery rating dialog html

getRatingDialog() : string
Static

Returns

string- the print dialog

Gets the search form

getSearch(string $current_search) : string
Static

Parameters

$current_search

string
  • The search val

Returns

string

Load the social media

getSocialMedia(object $event, string $lat = '', string $lng = '', object $location = null, object $organizer = null, $layout = "social.share") : string
Static

Parameters

$event

object
  • The event

$lat

string
  • Latitude of the event location (if any)

$lng

string
  • Latitude of the event location (if any)

$location

object
  • The location (if any)

$organizer

object
  • The organizer (if any)

$layout

Returns

string- The social media

Gets the HTML code for the tags form field

getTagFormField(string $value) : string
Static

Parameters

$value

string

The value for the tags field

Returns

stringThe html of the tags form field

Returns the bookings button for organizers

getViewBookingsButton(object $event, \JUser $user, \stdClass $booked) : string
Static

Parameters

$event

object
  • The event

$user

\JUser
  • The juser

$booked

\stdClass
  • Booking infos

Returns

string- The participants button

Renders a form field (JForm)

getXMLFormField(string $name, string $type, string $value, string $class = "form-control", string $directory = "", $format = '') : string
Static

Parameters

$name

string
  • The name

$type

string
  • The type (e.g. media)

$value

string
  • The value

$class

string
  • The class

$directory

string

The directory

$format

Returns

string

Checks if an event is bookable for the user (return bool)

isBookable(object $event, \JUser $user, integer $nrbooked, boolean $isbooked) : boolean
Static

Parameters

$event

object
  • The event

$user

\JUser
  • The user

$nrbooked

integer
  • How many places are bookable

$isbooked

boolean
  • Is the user booked?

Returns

boolean- True if bookable, false if not

Renders the moduels with the given positon

renderModule(string $position) : void
Static

Parameters

$position

string
  • the position

 Properties

 

<ul> <li>The event tax</li> </ul>

$event_tax : object

Default

null
Static