Service
extends AbstractEntity
in package
Tags
Table of Contents
- DEFAULT_COLOR = '#fbf8cc'
- DEPOSIT_TYPES = ['disabled', 'fixed', 'percentage']
- $bufferTimeAfter : int
- Buffer time in minutes.
- $bufferTimeBefore : int
- Buffer time in minutes.
- $color : string
- $depositAmount : float
- $depositType : string
- $description : string
- $duration : int
- Duration time in minutes.
- $employeeIds : array<string|int, int>
- $id : int
- $maxCapacity : int
- $minCapacity : int
- $multiplyPrice : bool
- $price : float
- $timeBeforeBooking : int
- Time in minutes.
- $title : string
- $variations : ServiceVariations
- $notificationNotices : array<string|int, string>
- __construct() : mixed
- getCapacityRange() : array<string|int, int>
- getColor() : mixed
- getDuration() : int
- getId() : int
- getMaxCapacity() : int
- getMaxGuests() : int
- getMinCapacity() : int
- getNotificationNotice1() : string
- getNotificationNotice2() : string
- getNotificationNotices() : array<string|int, string>
- getPrice() : float
- setupFields() : mixed
Constants
DEFAULT_COLOR
public
mixed
DEFAULT_COLOR
= '#fbf8cc'
DEPOSIT_TYPES
public
mixed
DEPOSIT_TYPES
= ['disabled', 'fixed', 'percentage']
Properties
$bufferTimeAfter
Buffer time in minutes.
public
int
$bufferTimeAfter
= 0
Tags
$bufferTimeBefore
Buffer time in minutes.
public
int
$bufferTimeBefore
= 0
Tags
$color
public
string
$color
= self::DEFAULT_COLOR
Tags
$depositAmount
public
float
$depositAmount
= 0
Tags
$depositType
public
string
$depositType
= 'disabled'
Tags
$description
public
string
$description
= ''
Tags
$duration
Duration time in minutes.
public
int
$duration
= 0
Tags
$employeeIds
public
array<string|int, int>
$employeeIds
= []
Tags
$id
public
int
$id
= 0
Tags
$maxCapacity
public
int
$maxCapacity
= 1
Tags
$minCapacity
public
int
$minCapacity
= 1
Tags
$multiplyPrice
public
bool
$multiplyPrice
= false
Tags
$price
public
float
$price
= 0.0
Tags
$timeBeforeBooking
Time in minutes.
public
int
$timeBeforeBooking
= 0
Tags
$title
public
string
$title
= ''
Tags
$variations
public
ServiceVariations
$variations
= []
Tags
$notificationNotices
protected
array<string|int, string>
$notificationNotices
= [1 => '', 2 => '']
Tags
Methods
__construct()
public
__construct(int $id[, array<string|int, mixed> $fieldValues = [] ]) : mixed
Parameters
- $id : int
- $fieldValues : array<string|int, mixed> = []
-
Optional.
Tags
Return values
mixed —getCapacityRange()
public
getCapacityRange(int $employeeId) : array<string|int, int>
Parameters
- $employeeId : int
-
Optional.
Tags
Return values
array<string|int, int> —getColor()
public
getColor() : mixed
Return values
mixed —getDuration()
public
getDuration(int $employeeId) : int
Parameters
- $employeeId : int
-
Optional.
Tags
Return values
int —getId()
public
getId() : int
Tags
Return values
int —getMaxCapacity()
public
getMaxCapacity(int $employeeId) : int
Parameters
- $employeeId : int
-
Optional.
Tags
Return values
int —getMaxGuests()
public
getMaxGuests(int $employeeId) : int
Parameters
- $employeeId : int
-
Optional.
Tags
Return values
int —The maximum number of guests in range [0; ∞).
getMinCapacity()
public
getMinCapacity(int $employeeId) : int
Parameters
- $employeeId : int
-
Optional.
Tags
Return values
int —getNotificationNotice1()
public
getNotificationNotice1() : string
Tags
Return values
string —getNotificationNotice2()
public
getNotificationNotice2() : string
Tags
Return values
string —getNotificationNotices()
public
getNotificationNotices() : array<string|int, string>
Tags
Return values
array<string|int, string> —[1 => ..., 2 => ...]
getPrice()
public
getPrice(int $employeeId, int $capacity) : float
Parameters
- $employeeId : int
-
Optional. 0 by default.
- $capacity : int
-
Optional. 0 by default (minimum capacity of the service).
Tags
Return values
float —setupFields()
protected
setupFields( $fieldValues) : mixed