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
Helper68Catch-all static service: meta access, URL builders, settings, encryption, sanitization, and lookups.
DateTimeHelper25Timezone-aware datetime conversion, formatting, and slot math.
LocationService6Meeting location types, their settings shape, and their rendered output.
PermissionManager14Capability 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\Helper — fluent-booking/app/Services/Helper.php

MethodSignatureLine
isCalendarSlugAvailablestatic isCalendarSlugAvailable($slug, $checkDb = true, $exceptId = false)620
isEventSlugAvailablestatic isEventSlugAvailable($slug, $checkDb = true, $calendarId = null, $exceptId = null)652
getAppBaseUrlstatic getAppBaseUrl($extension = '')688
getAdminBookingUrlstatic getAdminBookingUrl($bookingId)693
getUpgradeUrlstatic getUpgradeUrl($content = 'upgrade_page', $overrides = [])713
getNextBookingGroupstatic getNextBookingGroup()736
getNextIndexstatic getNextIndex()747
getGlobalPaymentSettingsstatic getGlobalPaymentSettings()756
isPaymentEnabledstatic isPaymentEnabled($calendarEvent = null)769
isPaymentConfiguredstatic isPaymentConfigured($method = 'stripe')792
fluentbookingSanitizerstatic fluentbookingSanitizer($input, $attribute = null, $fields = [])806
getMetastatic getMeta($group, $objectId, $key, $withModel = false)835
updateMetastatic updateMeta($group, $objectId, $key, $value)853
deleteMetastatic deleteMeta($group, $objectId, $key)871
getBookingMetastatic getBookingMeta($eventId, $metaKey, $withModel = false)879
updateBookingMetastatic updateBookingMeta($eventId, $metaKey, $value)892
getUserDisplayNamestatic getUserDisplayName($userId = null)909
getDisplayNameFromUserstatic getDisplayNameFromUser($user)924
getUserEmailstatic getUserEmail($userId = null)944
excerptstatic excerpt($text, $max_length = 160)957
generateSlotSlugstatic generateSlotSlug($default, $calendar)973
getIpstatic getIp($defalt = '127.0.0.1')990
resolveClientIpstatic resolveClientIp($serverData)1021
isValidPhoneNumberstatic isValidPhoneNumber($phone)1049
fcal_sanitize_htmlstatic fcal_sanitize_html($html)1158
fcal_backend_sanitizerstatic fcal_backend_sanitizer($inputs, $sanitizeMap = [])1228
fcalImplodeRecursivestatic fcalImplodeRecursive($glue, array $array)1258
getEventColorsstatic getEventColors()1276
getMeetingDurationsstatic getMeetingDurations()1314
getMeetingMultiDurationsstatic getMeetingMultiDurations()1340
getDurationLookupstatic getDurationLookup($multiDuration = false)1398
formatDurationstatic formatDuration($totalMinutes)1410
getBufferTimesstatic getBufferTimes()1435
getSlotIntervalsstatic getSlotIntervals()1481
getBookingStatusChangingTimesstatic getBookingStatusChangingTimes()1535
getBookingPeriodOptionsstatic getBookingPeriodOptions()1593
getWeekSelectTimesstatic getWeekSelectTimes()1604
getOverrideSelectTimesstatic getOverrideSelectTimes()1613
getWeeklyScheduleSchemastatic getWeeklyScheduleSchema()1622
getCustomFieldTypesstatic getCustomFieldTypes()1666
getDefaultTermsAndConditionsstatic getDefaultTermsAndConditions()1728
getDefaultEmailNotificationSettingsstatic getDefaultEmailNotificationSettings()1735
getAddToCalendarHtmlstatic getAddToCalendarHtml($assetUrl = '')1857
getConfirmAndRejectButtonstatic getConfirmAndRejectButton($assetUrl = '')1866
getIframeHtmlstatic getIframeHtml()1875
getEditorShortCodesstatic getEditorShortCodes($calendarEvent = null, $isHtmlSupported = false, $iframeHtml = '')1882
encryptKeystatic encryptKey($value)2080
decryptKeystatic decryptKey($raw_value)2110
debugLogstatic debugLog($data)2151
getGlobalSettingsstatic getGlobalSettings($settingsKey = null)2158
getGlobalAdminSettingstatic getGlobalAdminSetting($key = null, $default = null)2233
getDefaultTimeFormatstatic getDefaultTimeFormat()2255
getDefaultBookingFiltersstatic getDefaultBookingFilters()2268
getDefaultPaginationsstatic getDefaultPaginations()2278
getVerifiedSendersstatic getVerifiedSenders()2288
getBookingReceiptLandingBaseUrlstatic getBookingReceiptLandingBaseUrl()2304
getGlobalModuleSettingsstatic getGlobalModuleSettings($cached = true)2309
updateGlobalModuleSettingsstatic updateGlobalModuleSettings($settings = [])2326
isModuleEnabledstatic isModuleEnabled($module)2337
fluentbooking_is_rtlstatic fluentbooking_is_rtl()2347
fluentBookingUserAvatarstatic fluentBookingUserAvatar($id_or_email, $args)2357
getPrefSettingsstatic getPrefSettings($cached = true)2365
getPrefSettinsstatic getPrefSettins($cached = true)2398
getFeaturesstatic getFeatures()2403
getActiveThemeNamestatic getActiveThemeName()2414
lockRoundRobinSlotstatic lockRoundRobinSlot($event, $startTimeUtc, $endTimeUtc)2438
checkRateLimitstatic checkRateLimit($action, $limit, $window = 60, $perIp = true)2463
dbTransactionstatic dbTransaction($callback)2501

DateTimeHelper ​

FluentBooking\App\Services\DateTimeHelper — fluent-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\LocationService — fluent-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
sanitizePublicLocationSettingsstatic sanitizePublicLocationSettings($locationSettings)230

PermissionManager ​

FluentBooking\App\Services\PermissionManager — fluent-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
canAssignHostsstatic canAssignHosts($memberIds, $allowedIds)107
hasCalendarAccessstatic hasCalendarAccess($calendar)119
currentUserHasAnyPermissionstatic currentUserHasAnyPermission()126
userCanstatic userCan($permissions)135
canManageOtherHostsstatic canManageOtherHosts()167
getUserPermissionsstatic getUserPermissions($user = null, $formatted = false)172
getMetaPermissionsstatic getMetaPermissions($userId = null)235
getMenuPermissionstatic getMenuPermission()257
userCanSeeAllBookingsstatic userCanSeeAllBookings()287

BookingFieldService ​

FluentBooking\App\Services\BookingFieldService — fluent-booking/app/Services/BookingFieldService.php

MethodSignatureLine
getCustomFieldsDatastatic getCustomFieldsData($postedData, CalendarSlot $slot, $mappedKeys = null)16
getBookingFieldsstatic getBookingFields(CalendarSlot $calendarSlot, $cached = false)82
getBookingFieldLabelsstatic getBookingFieldLabels(CalendarSlot $calendarSlot, $enabledOnly = false)264
generateFieldNamestatic generateFieldName($calendarEvent, $fieldLabel)280
maybeGenerateFieldNamestatic maybeGenerateFieldName($calendarEvent, $fieldValue)299
getFormattedCustomBookingDatastatic getFormattedCustomBookingData(Booking $booking, $htmlSupport = true, $isPublic = false)312
getCustomFieldsstatic getCustomFields($calendarEvent, $withConfig = false)356
getBookingFieldByNamestatic getBookingFieldByName($calendarEvent, $name)380
hasPhoneNumberFieldstatic hasPhoneNumberField($fields)393
getUploadedFilesstatic getUploadedFiles($fieldValue, $htmlSupport = true)415
validateDateFieldsstatic validateDateFields($customFieldsData, $calendarEvent)433
sanitizeBookingFieldsstatic sanitizeBookingFields($bookingFields, $calendarEvent = null)463

EditorShortCodeParser ​

FluentBooking\App\Services\EditorShortCodeParser — fluent-booking/app/Services/EditorShortCodeParser.php

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