Documentation

CalendarEvent extends CalendarLibrary

Calendar Class Event

Tags
subpackage

module_calendar

author

Cloudrexx info@cloudrexx.com

copyright

CLOUDREXX CMS - CLOUDREXX AG

version
1.00

Table of Contents

Constants

ATTACHMENT_FIELD_KEY  = 'attachment_id'
Attachment field key
EVENT_REGISTRATION_EXTERNAL  = 2
Registration type external
EVENT_REGISTRATION_INTERNAL  = 1
Registration type internal
EVENT_REGISTRATION_NONE  = 0
Registration type none
MAP_FIELD_KEY  = 'map_id'
map field key
PICTURE_FIELD_KEY  = 'picture_id'
Picture field key
SHOW_EVENTS_OF_TODAY  = 0
Setting value for option frontendPastEvents defining that all events having their start date as of today shall be listed in frontend till the end of today.
SHOW_EVENTS_UNTIL_END  = 1
Setting value for option frontendPastEvents defining that only those events shall be listed in frontend that have not yet ended (end date lies in the past)
SHOW_EVENTS_UNTIL_START  = 2
Setting value for option frontendPastEvents defining that only those events shall be listed in frontend that have not yet started (start date lies in the future)

Properties

$_objTpl  : object
Template object
$access  : bool
Event show end date on detail view
$arrCommunityGroups  : array<string|int, mixed>
Community group array
$arrData  : array<string|int, mixed>
Event data
$arrFrontendLanguages  : array<string|int, mixed>
active frontend languages
$arrSettings  : array<string|int, mixed>
Settings array
$attach  : string
Event attachment file name
$author  : string
Event author
$availableLang  : array<string|int, mixed>
Avaliable languages
$category_ids  : array<string|int, mixed>
Category IDs
$confirmed  : bool
Event confirmed
$csvSeparator  : string
CSV separator
$description  : string
Event description
$emailTemplate  : int
Event E-mail template
$endDate  : int
Event enddate timestamp
$errMessage  : string
Error message
$excludedCrmGroups  : array<string|int, mixed>
Event excluded CRM groups
$external  : bool
External
$google  : int
Event google status
$hostId  : string
Event host id
$hostType  : int
Event Host type 1 => Manual Entry 2 => Refer to mediadir module
$id  : int
Event id
$independentSeries  : bool
True when event is independent series
$invitationSent  : bool
is Event invitation sent
$invitationTemplate  : int
Template Id of the invitation mail
$invitedCrmGroups  : array<string|int, mixed>
Event invited CRM groups
$invitedGroups  : array<string|int, mixed>
Event invited group
$invitedMails  : array<string|int, mixed>
Event invited mail
$isAdditionalRecurrence  : bool
Whether this event is a regular event (or recurrence according to the series configuration) or if the event is a manually added additional recurrence.
$link  : string
Event link
$locationType  : int
Event location type 1 => Manual Entry 2 => Refer to mediadir module
$moduleLangVar  : string
module language variable prefix
$moduleName  : string
module name
$moduleTablePrefix  : string
module table prefix
$notificationTo  : string
Event notification the event
$numSeating  : int
Event available seating
$numSubscriber  : int
This sets the limit of available seats to register for in case registration is enabled ({@see $registration}).
$okMessage  : type
Success message
$org_city  : string
Event organizer city
$org_country  : string
Event organizer country
$org_email  : string
Event organizer email
$org_link  : string
Event organizer link
$org_name  : string
Event organizer name
$org_phone  : string
Event organizer phone
$org_street  : string
Event organizer street
$org_website  : string
Event organizer website
$org_zip  : string
Event organizer zip
$pageContent  : string
template content
$pic  : string
Event Picture
$place  : string
Event place
$place_city  : string
Event city
$place_country  : string
Event country
$place_link  : string
Event link
$place_map  : string
Event map
$place_phone  : string
Event place phone
$place_street  : string
Event street
$place_website  : string
Event place website
$place_zip  : string
Event zip
$price  : int
Event price
$priority  : int
Event priority
$registration  : bool
Event status of registration
$registrationExternalFullyBooked  : bool
True when external registration is fully booked
$registrationExternalLink  : string
Registration link, when registration type is external
$registrationForm  : int
Event registration form
$relatedHosts  : array<string|int, mixed>
Event related websites
$seriesData  : array<string|int, mixed>
Event series data
$seriesStatus  : int
Event series status
$settings  : array<string|int, mixed>
Static settings array to cache the fetched data from the database
$showDetailView  : bool
Whether or not to show the detail view of the event
$showEndDateDetail  : bool
Event show end date on detail view
$showEndDateList  : bool
Event show End date on list view
$showEndTimeDetail  : bool
Event show end time on detail view
$showEndTimeList  : bool
Event show End time on list view
$showIn  : array<string|int, mixed>
Event languages to show
$showStartDateDetail  : bool
Event show start date on detail view
$showStartDateList  : bool
Event show start date on list view
$showStartTimeDetail  : bool
Event show start time on detail view
$showStartTimeList  : bool
Event show start time on list view
$showTimeTypeDetail  : int
Event time type on detail view
$showTimeTypeList  : int
Event time type on list view
$startDate  : int
Event Start date timestamp
$status  : int
Event status
$teaser  : string
Event teaser
$ticketSales  : int
Event ticket sales
$title  : string
Event title
$type  : int
Event Type
$uploadImgPath  : string
module image upload physical path
$uploadImgWebPath  : string
module uploaded image web path
$useCustomDateDisplay  : bool
Whether or not if the event shall use its own custom date format
$cancellationCount  : int
Cancellation members count for the event
$cx  : Cx
$em  : EntityManager
$errorMessage  : string
Contains the last error message until its fetch using getErrorMessage()
$fetchedLangIds  : array<string|int, mixed>
Array of language IDs the event has been fetched from the database from already
$freePlaces  : int
Event free palces
$preLoadedData  : array<string|int, mixed>
$registrationCalculated  : bool
Flag to check whether the registration is already calculated or not.
$registrationCount  : int
Registered members count for the event
$waitlistCount  : int
Waitlist members count for the event

Methods

__clone()  : mixed
PHP clone, clone the start and end dates on clone
__construct()  : mixed
Constructor
_handleUpload()  : string
Handle the calendar image upload
checkAccess()  : null
Checks the access level for the given action
confirm()  : bool
confirm event
delete()  : bool
Delete the event
detachEntity()  : null
Detach the entity
detachJoinedEntity()  : null
Detach the jointed entity
export()  : null
Export the Event with calendar and stop excuting script
format2userDate()  : string
Returns the date string (according to the calendar's configuration) from a \DateTime object.
format2userDateTime()  : string
Returns the date/time string (according to the calendar's configuration) from a \DateTime object.
format2userTime()  : string
Returns the time string 'H:i' from a \DateTime object
formatDateTime2user()  : string
Returns a date/time string from a \DateTime object.
generateKey()  : string
generates the random key
get()  : null
Load the requested event by id
getCancellationCount()  : int
Returns the cancelled registration count of the event
getCommunityGroups()  : null
Initilize the available group
getComponent()  : SystemComponentController
Get component controller object
getDateFormat()  : string
Return's the dataformat based on the type
getDateTime()  : DateTime
Returns a \DateTime object from a calendar date/time string.
getDbDateTimeFromIntern()  : DateTime
Returns a \DateTime object in db timezone
getErrorMessage()  : string
Returns the current error message or an empty string if there's none
getEventEntity()  : Event
Get event entity
getEventFieldEntity()  : EventField
Get event field entity
getEventFieldsAsArray()  : array<string|int, mixed>
Get event fields as array
getEventSearchQuery()  : string
Used get the event search query From global search module.
getExeceptionDates()  : array<string|int, mixed>
Returns all series dates based on the given post data
getFreePlaces()  : int
Returns the number of free place of the event This will include the seating field of the registration form
getFrontendLanguages()  : null
Initialize the active frontend languages array
getHeadlinePlaceholders()  : array<string|int, mixed>
Get the list of calendar headline placeholders
getId()  : int
Get unique identifier of event
getInternDateTimeFromDb()  : DateTime
Returns a \DateTime object from a date/time string.
getInternDateTimeFromUser()  : DateTime
Returns a \DateTime object from a date/time string.
getJavascript()  : string
Return's the billing address javascript
getRegistrationCount()  : int
Returns the registration count of the event
getRegistrationMailRecipients()  : array<string|int, mixed>
Return the registered mail addresses as MailRecipients
getSettings()  : null
Prepares the settings from database to array format
getUserDateTimeFromIntern()  : DateTime
Returns a \DateTime object in user timezone
getWaitlistCount()  : int
Returns the waitlist registration count of the event
hasErrorMessage()  : bool
Tells whether there's an unread error message
init()  : mixed
Initialize $cx and $em
isAcceptingNewSubmissions()  : bool
isRegistrationTurnedOn()  : bool
loadEventFromData()  : mixed
loadHostData()  : bool
Sets the host related properties based on the configured source mode
loadLocationData()  : bool
Sets the location related properties based on the configured source mode
loadPlaceFromMediadir()  : bool
Loads the location or host data from the specified MediaDir entry
loadPlaceLinkFromMediadir()  : array<string|int, mixed>
Return event place url and its source link
resetRegistrationCount()  : mixed
Reset the registration count values.
save()  : bool
Save the event to the database
switchStatus()  : bool
switch status of the event
triggerEvent()  : null
Trigger the event
calculateRegistrationCount()  : null
Calculate the registration count (register, deregister, waitlist) of the event
flushEventFromPreLoadedData()  : mixed
getData()  : mixed
Load localized data from database
loadEventFromPreLoadedData()  : mixed
Load event data of event having ID $eventId into this instance.
loadHostRelations()  : mixed
onlyShowLocalizedEvents()  : bool
parseDateTimeString()  : array<string|int, mixed>
Split a datetime string (i.E.: '08.06.2015 13:37') into an array containing the date, hour and minutes information as separate elements.

Constants

ATTACHMENT_FIELD_KEY

Attachment field key

public string ATTACHMENT_FIELD_KEY = 'attachment_id'

EVENT_REGISTRATION_EXTERNAL

Registration type external

public mixed EVENT_REGISTRATION_EXTERNAL = 2

EVENT_REGISTRATION_INTERNAL

Registration type internal

public mixed EVENT_REGISTRATION_INTERNAL = 1

EVENT_REGISTRATION_NONE

Registration type none

public mixed EVENT_REGISTRATION_NONE = 0

SHOW_EVENTS_OF_TODAY

Setting value for option frontendPastEvents defining that all events having their start date as of today shall be listed in frontend till the end of today.

public int SHOW_EVENTS_OF_TODAY = 0

SHOW_EVENTS_UNTIL_END

Setting value for option frontendPastEvents defining that only those events shall be listed in frontend that have not yet ended (end date lies in the past)

public int SHOW_EVENTS_UNTIL_END = 1

SHOW_EVENTS_UNTIL_START

Setting value for option frontendPastEvents defining that only those events shall be listed in frontend that have not yet started (start date lies in the future)

public int SHOW_EVENTS_UNTIL_START = 2
Tags
todo

Implement behavior of this option

Properties

$arrCommunityGroups

Community group array

public array<string|int, mixed> $arrCommunityGroups = array()
Tags
access

public

$arrData

Event data

public array<string|int, mixed> $arrData = array()
Tags
access

public

$arrFrontendLanguages

active frontend languages

public array<string|int, mixed> $arrFrontendLanguages = array()
Tags
access

public

$arrSettings

Settings array

public array<string|int, mixed> $arrSettings = array()
Tags
access

public

$availableLang

Avaliable languages

public array<string|int, mixed> $availableLang
Tags
access

public

$category_ids

Category IDs

public array<string|int, mixed> $category_ids = null
Tags
access

public

todo

Better replace all Event properties with one single doctrine Event instance... ...and drop this class.

$excludedCrmGroups

Event excluded CRM groups

public array<string|int, mixed> $excludedCrmGroups = array()

$hostType

Event Host type 1 => Manual Entry 2 => Refer to mediadir module

public int $hostType
Tags
access

public

$independentSeries

True when event is independent series

public bool $independentSeries

$invitationSent

is Event invitation sent

public bool $invitationSent
Tags
access

public

$invitationTemplate

Template Id of the invitation mail

public int $invitationTemplate

$invitedCrmGroups

Event invited CRM groups

public array<string|int, mixed> $invitedCrmGroups = array()

$invitedGroups

Event invited group

public array<string|int, mixed> $invitedGroups = array()
Tags
access

public

$invitedMails

Event invited mail

public array<string|int, mixed> $invitedMails = array()
Tags
access

public

$isAdditionalRecurrence

Whether this event is a regular event (or recurrence according to the series configuration) or if the event is a manually added additional recurrence.

public bool $isAdditionalRecurrence = false

TRUE if event is a manually added recurrence

$locationType

Event location type 1 => Manual Entry 2 => Refer to mediadir module

public int $locationType
Tags
access

public

$moduleLangVar

module language variable prefix

public string $moduleLangVar = "CALENDAR"
Tags
access

public

$moduleTablePrefix

module table prefix

public string $moduleTablePrefix = "calendar"
Tags
access

public

$notificationTo

Event notification the event

public string $notificationTo
Tags
access

public

$numSubscriber

This sets the limit of available seats to register for in case registration is enabled ({@see $registration}).

public int $numSubscriber

If set to 0, then no limit is imposed and infinite registrations can be submitted.

Tags
access

public

$registration

Event status of registration

public bool $registration
Tags
access

public

$registrationExternalFullyBooked

True when external registration is fully booked

public bool $registrationExternalFullyBooked

Registration link, when registration type is external

public string $registrationExternalLink

$registrationForm

Event registration form

public int $registrationForm
Tags
access

public

$relatedHosts

Event related websites

public array<string|int, mixed> $relatedHosts = array()
Tags
access

public

$seriesData

Event series data

public array<string|int, mixed> $seriesData = array('seriesType' => 0, 'seriesPatternCount' => 0, 'seriesPatternWeekday' => '', 'seriesPatternDay' => 0, 'seriesPatternWeek' => 0, 'seriesPatternMonth' => 0, 'seriesPatternType' => 0, 'seriesPatternDouranceType' => 0, 'seriesPatternEnd' => 0, 'seriesPatternEndDate' => '', 'seriesPatternBegin' => 0, 'seriesPatternExceptions' => array(), 'seriesAdditionalRecurrences' => array())
Tags
access

public

$settings

Static settings array to cache the fetched data from the database

public static array<string|int, mixed> $settings = array()

$showDetailView

Whether or not to show the detail view of the event

public bool $showDetailView

$showEndDateDetail

Event show end date on detail view

public bool $showEndDateDetail
Tags
access

public

$showEndDateList

Event show End date on list view

public bool $showEndDateList
Tags
access

public

$showEndTimeDetail

Event show end time on detail view

public bool $showEndTimeDetail
Tags
access

public

$showEndTimeList

Event show End time on list view

public bool $showEndTimeList
Tags
access

public

$showIn

Event languages to show

public array<string|int, mixed> $showIn
Tags
access

public

$showStartDateDetail

Event show start date on detail view

public bool $showStartDateDetail
Tags
access

public

$showStartDateList

Event show start date on list view

public bool $showStartDateList
Tags
access

public

$showStartTimeDetail

Event show start time on detail view

public bool $showStartTimeDetail
Tags
access

public

$showStartTimeList

Event show start time on list view

public bool $showStartTimeList
Tags
access

public

$showTimeTypeDetail

Event time type on detail view

public int $showTimeTypeDetail
Tags
access

public

$showTimeTypeList

Event time type on list view

public int $showTimeTypeList
Tags
access

public

$uploadImgPath

module image upload physical path

public string $uploadImgPath = ''
Tags
access

public

$uploadImgWebPath

module uploaded image web path

public string $uploadImgWebPath = ''
Tags
access

public

$useCustomDateDisplay

Whether or not if the event shall use its own custom date format

public bool $useCustomDateDisplay

$cancellationCount

Cancellation members count for the event

protected int $cancellationCount = 0

$errorMessage

Contains the last error message until its fetch using getErrorMessage()

protected string $errorMessage = ''

$fetchedLangIds

Array of language IDs the event has been fetched from the database from already

protected array<string|int, mixed> $fetchedLangIds = array()

$registrationCalculated

Flag to check whether the registration is already calculated or not.

protected bool $registrationCalculated = false

$registrationCount

Registered members count for the event

protected int $registrationCount = 0

$waitlistCount

Waitlist members count for the event

protected int $waitlistCount = 0

Methods

__clone()

PHP clone, clone the start and end dates on clone

public __clone() : mixed

__construct()

Constructor

public __construct([int $id = null ]) : mixed

Loads the event object of given id Call the parent constructor to initialize the settings values

Parameters
$id : int = null

Event id

_handleUpload()

Handle the calendar image upload

public _handleUpload(string $id) : string
Parameters
$id : string

uploaderId

Return values
string

image path

checkAccess()

Checks the access level for the given action

public checkAccess(string $strAction) : null

It checks the access level for the given action and return's null if access is granted otherwise it redirect the action to the respective fallback pages.

Parameters
$strAction : string

possible values are add_event, edit_event, my_events

Return values
null

confirm()

confirm event

public confirm() : bool
Return values
bool

true if event confirmed, false otherwise

delete()

Delete the event

public delete() : bool
Return values
bool

true if deleted successfully, false otherwise

detachEntity()

Detach the entity

public detachEntity(object $entity, string $methodName, array<string|int, mixed> $relation, array<string|int, mixed> $joinEntityRelation) : null
Parameters
$entity : object

entity object

$methodName : string

method name

$relation : array<string|int, mixed>

relationship array

$joinEntityRelation : array<string|int, mixed>

joined entity's relationship array

Return values
null

detachJoinedEntity()

Detach the jointed entity

public detachJoinedEntity(object $entity, array<string|int, mixed> $relations, array<string|int, mixed> $joinEntityRelation) : null
Parameters
$entity : object

entity object

$relations : array<string|int, mixed>

relationship array

$joinEntityRelation : array<string|int, mixed>

joined entity's relationship array

Return values
null

export()

Export the Event with calendar and stop excuting script

public export() : null
Return values
null

format2userDate()

Returns the date string (according to the calendar's configuration) from a \DateTime object.

public format2userDate(DateTime $dateTime) : string

The SUPPLIED \DateTime object must be in INTERNAL timezone. The RETURNED date string will be in USER timezone.

Parameters
$dateTime : DateTime

DateTime object in internal timezone

Return values
string

A date string

format2userDateTime()

Returns the date/time string (according to the calendar's configuration) from a \DateTime object.

public format2userDateTime(DateTime $dateTime) : string

The SUPPLIED \DateTime object must be in INTERNAL timezone. The RETURNED date/time string will be in USER timezone.

Parameters
$dateTime : DateTime

DateTime object in internal timezone

Return values
string

A date/time string

format2userTime()

Returns the time string 'H:i' from a \DateTime object

public format2userTime(DateTime $dateTime) : string

The SUPPLIED \DateTime object must be in INTERNAL timezone. The RETURNED time string will be in USER timezone.

Parameters
$dateTime : DateTime

DateTime object in internal timezone

Return values
string

A time string

formatDateTime2user()

Returns a date/time string from a \DateTime object.

public formatDateTime2user(DateTime $dateTime, string $format) : string

The SUPPLIED \DateTime object must be in INTERNAL timezone. The RETURNED date/time string will be in USER timezone.

Parameters
$dateTime : DateTime

DateTime object in internal timezone

$format : string

Format string

Return values
string

A date/time string formatted according to $format

generateKey()

generates the random key

public generateKey() : string
Return values
string

combination of alphabet and number in random order

get()

Load the requested event by id

public get(int $eventId[, int $eventStartDate = null ][, int $langId = null ]) : null
Parameters
$eventId : int

Event Id

$eventStartDate : int = null

Event start date

$langId : int = null

Language id

Return values
null

getCancellationCount()

Returns the cancelled registration count of the event

public getCancellationCount() : int
Return values
int

getCommunityGroups()

Initilize the available group

public getCommunityGroups() : null

Fetch the available group from the database and assign those values into $this->arrCommunityGroups

Return values
null

getDateFormat()

Return's the dataformat based on the type

public getDateFormat([int $type = null ]) : string

Return's the dateformat by the given type 1 => frontend (javascript format alone) else backend

Parameters
$type : int = null

type 1 => frontend (javascript format alone) else backend

Return values
string

Date format

getDateTime()

Returns a \DateTime object from a calendar date/time string.

public getDateTime(string $date[, int $hour = 0 ][, int $minute = 0 ]) : DateTime

The format of a calendar date/time string can be configured in the settings section of the calendar component.

Note: In constrast to this method, the method getUserDateTimeFromUser() expects a PHP date/time string.

The SUPPLIED calendar date/time string must be in USER timezone. The RETURNED \DateTime object will be in INTERNAL timezone.

Parameters
$date : string

A calendar date/time string in user timezone

$hour : int = 0

Hour value

$minute : int = 0

Minute value

Return values
DateTime

\DateTime object in internal timezone

getDbDateTimeFromIntern()

Returns a \DateTime object in db timezone

public getDbDateTimeFromIntern(DateTime $dateTime) : DateTime

The SUPPLIED \DateTime object must be in INTERNAL timezone. The RETURNED \DateTime object will be in DB timezone.

Parameters
$dateTime : DateTime

\DateTime object in internal timezone

Return values
DateTime

\DateTime in db timezone

getErrorMessage()

Returns the current error message or an empty string if there's none

public getErrorMessage() : string
Return values
string

Error message or empty string

getEventEntity()

Get event entity

public getEventEntity(int $id[, array<string|int, mixed> $formDatas = array() ]) : Event
Parameters
$id : int

event id

$formDatas : array<string|int, mixed> = array()

event form field values

Return values
Event

getEventFieldEntity()

Get event field entity

public getEventFieldEntity(Event $event, array<string|int, mixed> $fieldValues) : EventField
Parameters
$event : Event

event entity

$fieldValues : array<string|int, mixed>

eventField's field values

Return values
EventField

getEventFieldsAsArray()

Get event fields as array

public getEventFieldsAsArray(array<string|int, mixed> $data, bool $convertBBCode, int $eventType) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

post data

$convertBBCode : bool

convert description into BBcode

$eventType : int

event type id

Return values
array<string|int, mixed>

the array of event fields

getEventSearchQuery()

Used get the event search query From global search module.

public static getEventSearchQuery(mixed $term) : string
Parameters
$term : mixed

Search term

Return values
string

search query

getExeceptionDates()

Returns all series dates based on the given post data

public getExeceptionDates() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array of dates

getFreePlaces()

Returns the number of free place of the event This will include the seating field of the registration form

public getFreePlaces() : int
Return values
int

getFrontendLanguages()

Initialize the active frontend languages array

public getFrontendLanguages() : null

Fetch the active frontend languages from the database and assign those values into $this->arrFrontendLanguages

Return values
null

getHeadlinePlaceholders()

Get the list of calendar headline placeholders

public static getHeadlinePlaceholders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getId()

Get unique identifier of event

public getId() : int

Note: Event reocurrences do share the same unique identifier

Return values
int

ID of event

getInternDateTimeFromDb()

Returns a \DateTime object from a date/time string.

public getInternDateTimeFromDb([string $time = 'now' ]) : DateTime

The SUPPLIED date/time string must be in DB timezone. The RETURNED \DateTime object will be in INTERNAL timezone.

Parameters
$time : string = 'now'

A date/time string in db timezone

Return values
DateTime

\DateTime object in internal timezone

getInternDateTimeFromUser()

Returns a \DateTime object from a date/time string.

public getInternDateTimeFromUser([string $time = 'now' ]) : DateTime

The SUPPLIED date/time string must be in USER timezone. The RETURNED \DateTime object will be in INTERNAL timezone.

Parameters
$time : string = 'now'

A date/time string in user timezone

Return values
DateTime

\DateTime object in internal timezone

getJavascript()

Return's the billing address javascript

public getJavascript() : string
Return values
string

Billing HereDoc phpscript

getRegistrationCount()

Returns the registration count of the event

public getRegistrationCount() : int
Return values
int

getRegistrationMailRecipients()

Return the registered mail addresses as MailRecipients

public getRegistrationMailRecipients() : array<string|int, mixed>
Return values
array<string|int, mixed>

the mail recipients

getSettings()

Prepares the settings from database to array format

public getSettings() : null

Loads the settings values from the database and assign those values into $this->arrSettings

Return values
null

getUserDateTimeFromIntern()

Returns a \DateTime object in user timezone

public getUserDateTimeFromIntern(DateTime $dateTime) : DateTime

The SUPPLIED \DateTime object must be in INTERNAL timezone. The RETURNED \DateTime object will be in USER timezone.

Parameters
$dateTime : DateTime

\DateTime object in internal timezone

Return values
DateTime

\DateTime in user timezone

getWaitlistCount()

Returns the waitlist registration count of the event

public getWaitlistCount() : int
Return values
int

hasErrorMessage()

Tells whether there's an unread error message

public hasErrorMessage() : bool
Return values
bool

True if there's an unread error message, false otherwise

isAcceptingNewSubmissions()

public isAcceptingNewSubmissions() : bool
Return values
bool

isRegistrationTurnedOn()

public isRegistrationTurnedOn() : bool
Return values
bool

Whether registration has been enabled and the event has not yet begun.

loadEventFromData()

public loadEventFromData(mixed $data) : mixed
Parameters
$data : mixed

loadHostData()

Sets the host related properties based on the configured source mode

public loadHostData(string $scope) : bool

Call this method before pushing any host-data to the view layer. If the event contains any host-data, then the related properies ( CalendarEvent::org_name / CalendarEvent::org_street / CalendarEvent::org_zip / CalendarEvent::org_city / CalendarEvent::org_country / CalendarEvent::org_website / CalendarEvent::org_phone / CalendarEvent::org_email) will be initialized accordingly.

Parameters
$scope : string

Set to either of 'detail' or 'list' depending on where the host data will be used. This will determine the format to be used for rendering the host data of a MediaDir entry.

Return values
bool

TRUE of the event contains any host-data, otherwise FALSE

loadLocationData()

Sets the location related properties based on the configured source mode

public loadLocationData(string $scope) : bool

Call this method before pushing any location-data to the view layer. If the event contains any location-data, then the related properies ( CalendarEvent::place / CalendarEvent::place_street / CalendarEvent::place_zip / CalendarEvent::place_city / CalendarEvent::place_country / CalendarEvent::place_website / CalendarEvent::place_phone / CalendarEvent::place_map / CalendarEvent::google) will be initialized accordingly.

Parameters
$scope : string

Set to either of 'detail' or 'list' depending on where the location data will be used. This will determine the format to be used for rendering the location data of a MediaDir entry.

Return values
bool

TRUE of the event contains any host-data, otherwise FALSE

loadPlaceFromMediadir()

Loads the location or host data from the specified MediaDir entry

public loadPlaceFromMediadir([int $intMediaDirId = 0 ][, string $type = 'place' ][, string $scope = 'list' ]) : bool
Parameters
$intMediaDirId : int = 0

ID of the MediaDir entry

$type : string = 'place'

Set to 'place' to load entry as location data. Otherwise set to 'host' to load entry as host data.

$scope : string = 'list'

Set to either of 'detail' or 'list' depending on where the place data will be used. This will determine the format to be used for rendering the place data of a MediaDir entry.

Return values
bool

TRUE on success (data loaded), FALSE on failure (no data loaded).

loadPlaceLinkFromMediadir()

Return event place url and its source link

public loadPlaceLinkFromMediadir([mixed $intMediaDirId = 0 ][, mixed $type = 'place' ]) : array<string|int, mixed>
Parameters
$intMediaDirId : mixed = 0
$type : mixed = 'place'
Return values
array<string|int, mixed>

place url and its source link

resetRegistrationCount()

Reset the registration count values.

public resetRegistrationCount() : mixed

save()

Save the event to the database

public save(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>
Return values
bool

true if saved successfully, false otherwise

switchStatus()

switch status of the event

public switchStatus() : bool
Return values
bool

true if status updated, false otherwise

triggerEvent()

Trigger the event

public triggerEvent(string $eventName[, object $entity = null ][, array<string|int, mixed> $relations = array() ][, bool $isDetach = false ]) : null
Parameters
$eventName : string

trigger event name

$entity : object = null

entity object

$relations : array<string|int, mixed> = array()

entity relations

$isDetach : bool = false

is detachable entity

Return values
null

calculateRegistrationCount()

Calculate the registration count (register, deregister, waitlist) of the event

protected calculateRegistrationCount() : null
Tags
staticvar

boolean $calculated Flag to check whether the registration is already calculated or not.

Return values
null

getData()

Load localized data from database

protected getData([int $eventId = 0 ][, int $loadedLangId = 0 ]) : mixed
Parameters
$eventId : int = 0

Set to an ID of an event to ensure its localized data will be loaded.

$loadedLangId : int = 0

ID of locale that shall be used for output.

loadEventFromPreLoadedData()

Load event data of event having ID $eventId into this instance.

protected loadEventFromPreLoadedData(int $eventId, int $langId) : mixed
Parameters
$eventId : int

ID of event to load

$langId : int

ID of locale to load localized data in.

loadHostRelations()

protected loadHostRelations(int $loadedLangId) : mixed
Parameters
$loadedLangId : int

ID of locale in which the current events have been loaded in.

onlyShowLocalizedEvents()

protected onlyShowLocalizedEvents() : bool
Return values
bool

parseDateTimeString()

Split a datetime string (i.E.: '08.06.2015 13:37') into an array containing the date, hour and minutes information as separate elements.

protected parseDateTimeString(string $datetime[, bool $allDay = false ][, bool $end = false ]) : array<string|int, mixed>
Parameters
$datetime : string

The datetime string to parse.

$allDay : bool = false

If set to TRUE, then the returned hour and minutes value are set to 0, unless $end is also set to TRUE.

$end : bool = false

If set to TRUE and $allDay is also set to TRUE, then the returned hour is set to 23 and the minutes to 59. If $allDay is not set to TRUE, then this argument has no effect.

Return values
array<string|int, mixed>

Return parsed datetime as array having the following format:

array(
     d.m.Y,
     G,
     m
)

        
On this page

Search results