Skip to content

Service API Index

Every public method on the helper and service classes integrators call directly, parsed from the plugin source. The Helper Class Reference groups the most useful ones with notes; this page is the complete list.

Classes

ClassMethodsPurpose
Helper66Catch-all static service: meta access, URL builders, settings, encryption, sanitization, and lookups.
DateTimeHelper25Timezone-aware datetime conversion, formatting, and slot math.
LocationService5Meeting location types, their settings shape, and their rendered output.
PermissionManager12Capability checks for hosts, admins, and the REST policies.
BookingFieldService12Booking-form field definitions, validation, and stored answers.
EditorShortCodeParser1Smartcode parsing used by email templates and landing pages.

Helper

FluentBooking\App\Services\Helperfluent-booking/app/Services/Helper.php

MethodSignatureLine
isCalendarSlugAvailablestatic isCalendarSlugAvailable($slug, $checkDb = true, $exceptId = false)619
isEventSlugAvailablestatic isEventSlugAvailable($slug, $checkDb = true, $calendarId = null, $exceptId = null)651
getAppBaseUrlstatic getAppBaseUrl($extension = '')687
getAdminBookingUrlstatic getAdminBookingUrl($bookingId)692
getUpgradeUrlstatic getUpgradeUrl($content = 'upgrade_page', $overrides = [])712
getNextBookingGroupstatic getNextBookingGroup()735
getNextIndexstatic getNextIndex()746
getGlobalPaymentSettingsstatic getGlobalPaymentSettings()755
isPaymentEnabledstatic isPaymentEnabled($calendarEvent = null)768
isPaymentConfiguredstatic isPaymentConfigured($method = 'stripe')791
fluentbookingSanitizerstatic fluentbookingSanitizer($input, $attribute = null, $fields = [])805
getMetastatic getMeta($group, $objectId, $key, $withModel = false)834
updateMetastatic updateMeta($group, $objectId, $key, $value)852
deleteMetastatic deleteMeta($group, $objectId, $key)870
getBookingMetastatic getBookingMeta($eventId, $metaKey, $withModel = false)878
updateBookingMetastatic updateBookingMeta($eventId, $metaKey, $value)891
getUserDisplayNamestatic getUserDisplayName($userId = null)908
getDisplayNameFromUserstatic getDisplayNameFromUser($user)923
getUserEmailstatic getUserEmail($userId = null)943
excerptstatic excerpt($text, $max_length = 160)956
generateSlotSlugstatic generateSlotSlug($default, $calendar)972
getIpstatic getIp($defalt = '127.0.0.1')989
isValidPhoneNumberstatic isValidPhoneNumber($phone)1047
fcal_sanitize_htmlstatic fcal_sanitize_html($html)1156
fcal_backend_sanitizerstatic fcal_backend_sanitizer($inputs, $sanitizeMap = [])1226
fcalImplodeRecursivestatic fcalImplodeRecursive($glue, array $array)1256
getEventColorsstatic getEventColors()1274
getMeetingDurationsstatic getMeetingDurations()1312
getMeetingMultiDurationsstatic getMeetingMultiDurations()1338
getDurationLookupstatic getDurationLookup($multiDuration = false)1396
formatDurationstatic formatDuration($totalMinutes)1408
getBufferTimesstatic getBufferTimes()1433
getSlotIntervalsstatic getSlotIntervals()1479
getBookingStatusChangingTimesstatic getBookingStatusChangingTimes()1533
getBookingPeriodOptionsstatic getBookingPeriodOptions()1591
getWeekSelectTimesstatic getWeekSelectTimes()1602
getOverrideSelectTimesstatic getOverrideSelectTimes()1611
getWeeklyScheduleSchemastatic getWeeklyScheduleSchema()1620
getCustomFieldTypesstatic getCustomFieldTypes()1664
getDefaultTermsAndConditionsstatic getDefaultTermsAndConditions()1726
getDefaultEmailNotificationSettingsstatic getDefaultEmailNotificationSettings()1733
getAddToCalendarHtmlstatic getAddToCalendarHtml($assetUrl = '')1855
getConfirmAndRejectButtonstatic getConfirmAndRejectButton($assetUrl = '')1864
getIframeHtmlstatic getIframeHtml()1873
getEditorShortCodesstatic getEditorShortCodes($calendarEvent = null, $isHtmlSupported = false, $iframeHtml = '')1880
encryptKeystatic encryptKey($value)2077
decryptKeystatic decryptKey($raw_value)2107
debugLogstatic debugLog($data)2148
getGlobalSettingsstatic getGlobalSettings($settingsKey = null)2155
getGlobalAdminSettingstatic getGlobalAdminSetting($key = null, $default = null)2230
getDefaultTimeFormatstatic getDefaultTimeFormat()2252
getDefaultBookingFiltersstatic getDefaultBookingFilters()2265
getDefaultPaginationsstatic getDefaultPaginations()2275
getVerifiedSendersstatic getVerifiedSenders()2285
getBookingReceiptLandingBaseUrlstatic getBookingReceiptLandingBaseUrl()2301
getGlobalModuleSettingsstatic getGlobalModuleSettings($cached = true)2306
updateGlobalModuleSettingsstatic updateGlobalModuleSettings($settings = [])2323
isModuleEnabledstatic isModuleEnabled($module)2334
fluentbooking_is_rtlstatic fluentbooking_is_rtl()2344
fluentBookingUserAvatarstatic fluentBookingUserAvatar($id_or_email, $args)2354
getPrefSettingsstatic getPrefSettings($cached = true)2362
getPrefSettinsstatic getPrefSettins($cached = true)2395
getFeaturesstatic getFeatures()2400
getActiveThemeNamestatic getActiveThemeName()2411
checkRateLimitstatic checkRateLimit($action, $limit, $window = 60)2431
dbTransactionstatic dbTransaction($callback)2469

DateTimeHelper

FluentBooking\App\Services\DateTimeHelperfluent-booking/app/Services/DateTimeHelper.php

MethodSignatureLine
getTimeZonesstatic getTimeZones($grouped = false)7
getFlatGroupedTimeZonesstatic getFlatGroupedTimeZones()30
getTimeZonestatic getTimeZone()56
guessTimeZonestatic guessTimeZone()66
getValidatedTimeZonestatic getValidatedTimeZone($requestedTimeZone)77
convertToUtcstatic convertToUtc($dateTime, $timezone, $format = 'Y-m-d H:i:s')92
convertFromUtcstatic convertFromUtc($dateTime, $timezone, $format = 'Y-m-d H:i:s')101
convertToTimeZonestatic convertToTimeZone($dateTime, $fromTimeZone, $toTimeZone, $format = 'Y-m-d H:i:s', $date = null)113
getDateWithoutDSTstatic getDateWithoutDST($timezone)131
convertToIsostatic convertToIso($dateTime, $fromTimeZone = 'UTC')139
convertFromIsostatic convertFromIso($dateTime, $toTimeZone = 'UTC')147
getIsoDurationInMinutesstatic getIsoDurationInMinutes($duration)155
getTimestampstatic getTimestamp($timezone = 'UTC')166
formatToLocalestatic formatToLocale($dateTime, $for = 'date')175
getFormattedDatestatic getFormattedDate($date, $from = '', $to = 'Y-m-d')189
getAvailableDateFormatsstatic getAvailableDateFormats()199
getFormattedEventTimestatic getFormattedEventTime($eventTime)224
convertPhpDateToDayJSFormaystatic convertPhpDateToDayJSFormay($phpFormat)237
getDateFormatterstatic getDateFormatter($isDayJs = false)317
getTimeFormatterstatic getTimeFormatter($isDayJs = false)327
getTodayDatestatic getTodayDate($timezone = 'UTC', $format = 'Y-m-d')337
getDayDifferencestatic getDayDifference($dateTime, $fromTimeZone, $toTimeZone, $refDate = 'now')344
getDaylightSavingTimestatic getDaylightSavingTime($timezone)362
isDaylightSavingActivestatic isDaylightSavingActive($dateTime, $timezone)379
getI18nDateTimeConfigstatic getI18nDateTimeConfig()398

LocationService

FluentBooking\App\Services\LocationServicefluent-booking/app/Services/LocationService.php

MethodSignatureLine
getLocationIconHeadingHtmlstatic getLocationIconHeadingHtml($details = [], $calendarEvent = null)11
getBookingLocationUrlstatic getBookingLocationUrl(Booking $booking)77
getLocationDetailsstatic getLocationDetails($calendarEvent, $userInput = [], $allInput = [])92
getLocationsConfigstatic getLocationsConfig()184
getLocationOptionsstatic getLocationOptions($calendarEvent, $keyed = false)189

PermissionManager

FluentBooking\App\Services\PermissionManagerfluent-booking/app/Services/PermissionManager.php

MethodSignatureLine
allPermissionSetsstatic allPermissionSets()12
hasAllCalendarAccessstatic hasAllCalendarAccess($readAccess = false)26
canReadCalendarstatic canReadCalendar($calendarId)37
canUpdateCalendarEventstatic canUpdateCalendarEvent($slotId)60
canWriteCalendarstatic canWriteCalendar($calendarId)79
hasCalendarAccessstatic hasCalendarAccess($calendar)98
currentUserHasAnyPermissionstatic currentUserHasAnyPermission()105
userCanstatic userCan($permissions)114
getUserPermissionsstatic getUserPermissions($user = null, $formatted = false)141
getMetaPermissionsstatic getMetaPermissions($userId = null)204
getMenuPermissionstatic getMenuPermission()226
userCanSeeAllBookingsstatic userCanSeeAllBookings()256

BookingFieldService

FluentBooking\App\Services\BookingFieldServicefluent-booking/app/Services/BookingFieldService.php

MethodSignatureLine
getCustomFieldsDatastatic getCustomFieldsData($postedData, CalendarSlot $slot)12
getBookingFieldsstatic getBookingFields(CalendarSlot $calendarSlot, $cached = false)67
getBookingFieldLabelsstatic getBookingFieldLabels(CalendarSlot $calendarSlot, $enabledOnly = false)251
generateFieldNamestatic generateFieldName($calendarEvent, $fieldLabel)267
maybeGenerateFieldNamestatic maybeGenerateFieldName($calendarEvent, $fieldValue)286
getFormattedCustomBookingDatastatic getFormattedCustomBookingData(Booking $booking, $htmlSupport = true, $isPublic = false)299
getCustomFieldsstatic getCustomFields($calendarEvent, $withConfig = false)338
getBookingFieldByNamestatic getBookingFieldByName($calendarEvent, $name)362
hasPhoneNumberFieldstatic hasPhoneNumberField($fields)375
getUploadedFilesstatic getUploadedFiles($fieldValue, $htmlSupport = true)397
validateDateFieldsstatic validateDateFields($customFieldsData, $calendarEvent)415
sanitizeBookingFieldsstatic sanitizeBookingFields($bookingFields, $calendarEvent = null)445

EditorShortCodeParser

FluentBooking\App\Services\EditorShortCodeParserfluent-booking/app/Services/EditorShortCodeParser.php

MethodSignatureLine
parsestatic parse($parsable, $booking, $requireHtml = true)24