Booking extends AbstractUniqueEntity
in package

Tags
since
1.0
see
BookingRepository

Table of Contents

$customer  : Customer
$customerNotes  : string
$id  : int
$reservations  : array<string|int, Reservation>
$status  : string
$totalPrice  : float
$uid  : string
Unique identifier. Most likely is UUID v4.
$couponId  : int
__construct()  : mixed
addLog()  : int|false
expectPayment()  : mixed
getCoupon()  : Coupon|null
getCouponId()  : int
getCustomer()  : Customer
getEmployeeIds()  : array<string|int, int>
getEmployees()  : array<string|int, mixed>
getExpectingPayment()  : Payment|null
getExpectingPaymentId()  : int
getId()  : int
getLocationIds()  : array<string|int, int>
getLocations()  : array<string|int, mixed>
getLogs()  : array<string|int, WP_Comment>
getPaidPrice()  : float
getPayments()  : array<string|int, Payment>
getReservations()  : array<string|int, Reservation>
getServiceIds()  : array<string|int, int>
getServices()  : array<string|int, mixed>
getToPayPrice()  : float
getTotalPrice()  : float
getUid()  : string
hasCoupon()  : bool
isAdminBooking()  : bool
isConfirmed()  : bool
isExpectsPayment()  : bool
mapReservations()  : array<string|int, mixed>
setCouponId()  : mixed
getLinkedEntities()  : array<string|int, mixed>
setupFields()  : mixed

Properties

$customer

public Customer $customer = null
Tags
since
1.0

$customerNotes

public string $customerNotes = ''
Tags
since
1.10.2

$id

public int $id = 0
Tags
since
1.0

$reservations

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

$status

public string $status = 'new'
Tags
since
1.0

$totalPrice

public float $totalPrice = 0.0
Tags
since
1.0

$uid

Unique identifier. Most likely is UUID v4.

public string $uid = ''
Tags
since
1.5.0

$couponId

protected int $couponId = 0
Tags
since
1.11.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

addLog()

public addLog(string $message[, int|null $authorId = null ]) : int|false
Parameters
$message : string
$authorId : int|null = null

Optional. Current logged in user ID by default.

Tags
since
1.14.0
Return values
int|false

The new comment's ID on success, false on failure.

expectPayment()

public expectPayment(Payment|int $payment) : mixed
Parameters
$payment : Payment|int
Tags
since
1.5.0
Return values
mixed

getCoupon()

public getCoupon() : Coupon|null
Tags
since
1.11.0
Return values
Coupon|null

getCouponId()

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

getCustomer()

public getCustomer() : Customer
Tags
since
1.13.0
Return values
Customer

getEmployeeIds()

public getEmployeeIds() : array<string|int, int>
Tags
since
1.0
Return values
array<string|int, int>

getEmployees()

public getEmployees([array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed> = []

Optional.

Tags
see
AbstractRepository::findAll()
since
1.0
Return values
array<string|int, mixed>

getExpectingPayment()

public getExpectingPayment() : Payment|null
Tags
since
1.5.0
Return values
Payment|null

getExpectingPaymentId()

public getExpectingPaymentId() : int
Tags
since
1.5.0
Return values
int

getId()

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

getLocationIds()

public getLocationIds() : array<string|int, int>
Tags
since
1.0
Return values
array<string|int, int>

getLocations()

public getLocations([array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed> = []

Optional.

Tags
see
AbstractRepository::findAll()
since
1.0
Return values
array<string|int, mixed>

getLogs()

public getLogs() : array<string|int, WP_Comment>
Tags
since
1.14.0
Return values
array<string|int, WP_Comment>

Logs in descending order.

getPaidPrice()

public getPaidPrice() : float
Tags
since
1.5.0
Return values
float

getPayments()

public getPayments() : array<string|int, Payment>
Tags
since
1.5.0
Return values
array<string|int, Payment>

getReservations()

public getReservations() : array<string|int, Reservation>
Tags
since
1.11.0
Return values
array<string|int, Reservation>

getServiceIds()

public getServiceIds() : array<string|int, int>
Tags
since
1.0
Return values
array<string|int, int>

getServices()

public getServices([array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed> = []

Optional.

Tags
see
AbstractRepository::findAll()
since
1.0
Return values
array<string|int, mixed>

getToPayPrice()

public getToPayPrice() : float
Tags
since
1.5.0
Return values
float

getTotalPrice()

public getTotalPrice() : float
Tags
since
1.5.0
Return values
float

getUid()

public getUid() : string
Tags
since
1.5.0
Return values
string

hasCoupon()

public hasCoupon() : bool
Tags
since
1.11.0
Return values
bool

isAdminBooking()

public isAdminBooking() : bool
Tags
since
1.10.1
Return values
bool

isConfirmed()

public isConfirmed() : bool
Tags
since
1.11.0
Return values
bool

isExpectsPayment()

public isExpectsPayment(Payment|int $payment) : bool
Parameters
$payment : Payment|int
Tags
since
1.5.0
Return values
bool

mapReservations()

public mapReservations(string $propertyName) : array<string|int, mixed>
Parameters
$propertyName : string
Tags
since
1.0
Return values
array<string|int, mixed>

setCouponId()

public setCouponId(int $couponId) : mixed
Parameters
$couponId : int
Tags
since
1.11.0
Return values
mixed

getLinkedEntities()

protected getLinkedEntities(array<string|int, int> $ids, array<string|int, mixed> $args, string $getCallback) : array<string|int, mixed>
Parameters
$ids : array<string|int, int>
$args : array<string|int, mixed>
$getCallback : string
Tags
since
1.0
Return values
array<string|int, mixed>

setupFields()

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

Search results