Service extends AbstractEntity
in package

Tags
since
1.0
see
ServiceRepository

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
since
1.0

$bufferTimeBefore

Buffer time in minutes.

public int $bufferTimeBefore = 0
Tags
since
1.0

$color

public string $color = self::DEFAULT_COLOR
Tags
since
1.11.0

$depositAmount

public float $depositAmount = 0
Tags
since
1.14.0

$depositType

public string $depositType = 'disabled'
Tags
since
1.14.0

$description

public string $description = ''
Tags
since
1.0

$duration

Duration time in minutes.

public int $duration = 0
Tags
since
1.0

$employeeIds

public array<string|int, int> $employeeIds = []
Tags
since
1.0

$id

public int $id = 0
Tags
since
1.0

$maxCapacity

public int $maxCapacity = 1
Tags
since
1.0

$minCapacity

public int $minCapacity = 1
Tags
since
1.0

$multiplyPrice

public bool $multiplyPrice = false
Tags
since
1.3.1

$price

public float $price = 0.0
Tags
since
1.0

$timeBeforeBooking

Time in minutes.

public int $timeBeforeBooking = 0
Tags
since
1.0

$title

public string $title = ''
Tags
since
1.0

$variations

public ServiceVariations $variations = []
Tags
since
1.3.1

$notificationNotices

protected array<string|int, string> $notificationNotices = [1 => '', 2 => '']
Tags
since
1.13.0

Methods

__construct()

public __construct(int $id[, array<string|int, mixed> $fieldValues = [] ]) : mixed
Parameters
$id : int
$fieldValues : array<string|int, mixed> = []

Optional.

Tags
since
1.0
Return values
mixed

getCapacityRange()

public getCapacityRange(int $employeeId) : array<string|int, int>
Parameters
$employeeId : int

Optional.

Tags
since
1.9.0
Return values
array<string|int, int>

getColor()

public getColor() : mixed
Return values
mixed

getDuration()

public getDuration(int $employeeId) : int
Parameters
$employeeId : int

Optional.

Tags
since
1.0
Return values
int

getId()

public getId() : int
Tags
since
1.11.0
Return values
int

getMaxCapacity()

public getMaxCapacity(int $employeeId) : int
Parameters
$employeeId : int

Optional.

Tags
since
1.3.1
Return values
int

getMaxGuests()

public getMaxGuests(int $employeeId) : int
Parameters
$employeeId : int

Optional.

Tags
since
1.3.1
Return values
int

The maximum number of guests in range [0; ∞).

getMinCapacity()

public getMinCapacity(int $employeeId) : int
Parameters
$employeeId : int

Optional.

Tags
since
1.3.1
Return values
int

getNotificationNotice1()

public getNotificationNotice1() : string
Tags
since
1.13.0
Return values
string

getNotificationNotice2()

public getNotificationNotice2() : string
Tags
since
1.13.0
Return values
string

getNotificationNotices()

public getNotificationNotices() : array<string|int, string>
Tags
since
1.13.0
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
since
1.0
since
1.3.1

added the $capacity argument.

Return values
float

setupFields()

protected setupFields( $fieldValues) : mixed
Parameters
$fieldValues :
Tags
since
1.0
Return values
mixed

Search results