BookingStatuses
extends AbstractPostStatuses
in package
Tags
Table of Contents
- STATUS_ABANDONED = 'abandoned'
- STATUS_AUTO_DRAFT = 'auto-draft'
- STATUS_CANCELLED = 'cancelled'
- STATUS_CONFIRMED = 'confirmed'
- STATUS_DRAFT = 'draft'
- STATUS_NEW = 'new'
- STATUS_PENDING = 'pending'
- STATUS_PUBLISH = 'publish'
- STATUS_TRASH = 'trash'
- $entityType : string
- $postType : string
- $statuses : array<string|int, mixed>
- __construct() : mixed
- getBlockerStatuses() : array<string|int, mixed>
- getBookedStatuses() : array<string|int, mixed>
- getDefaultManualStatus() : string
- getFailedStatuses() : array<string|int, mixed>
- getLabel() : string
- getLabels() : array<string|int, mixed>
- getManualStatuses() : array<string|int, mixed>
- getNonblockerStatuses() : array<string|int, mixed>
- getPendingStatuses() : array<string|int, mixed>
- getUnblockedTimeSlotsStatuses() : array<string|int, string>
- hasStatus() : bool
- registerStatuses() : mixed
- transitionStatus() : mixed
- addActions() : mixed
- finishTransition() : mixed
- initStatuses() : mixed
- isNewPost() : bool
- notifyTransition() : mixed
Constants
STATUS_ABANDONED
public
mixed
STATUS_ABANDONED
= 'abandoned'
Tags
STATUS_AUTO_DRAFT
public
mixed
STATUS_AUTO_DRAFT
= 'auto-draft'
Tags
STATUS_CANCELLED
public
mixed
STATUS_CANCELLED
= 'cancelled'
Tags
STATUS_CONFIRMED
public
mixed
STATUS_CONFIRMED
= 'confirmed'
Tags
STATUS_DRAFT
public
mixed
STATUS_DRAFT
= 'draft'
Tags
STATUS_NEW
public
mixed
STATUS_NEW
= 'new'
Tags
STATUS_PENDING
public
mixed
STATUS_PENDING
= 'pending'
Tags
STATUS_PUBLISH
public
mixed
STATUS_PUBLISH
= 'publish'
Tags
STATUS_TRASH
public
mixed
STATUS_TRASH
= 'trash'
Tags
Properties
$entityType
protected
string
$entityType
Tags
$postType
protected
string
$postType
Tags
$statuses
protected
array<string|int, mixed>
$statuses
= []
Tags
Methods
__construct()
public
__construct(string $postType) : mixed
Parameters
- $postType : string
Tags
Return values
mixed —getBlockerStatuses()
public
getBlockerStatuses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —[Status => Label]
getBookedStatuses()
public
getBookedStatuses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —[Status => Label]
getDefaultManualStatus()
public
getDefaultManualStatus() : string
Tags
Return values
string —getFailedStatuses()
public
getFailedStatuses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —[Status => Label]
getLabel()
public
getLabel(string $status) : string
Parameters
- $status : string
Tags
Return values
string —getLabels()
public
getLabels(array<string|int, string> $statuses) : array<string|int, mixed>
Parameters
- $statuses : array<string|int, string>
Tags
Return values
array<string|int, mixed> —[Status => Label]
getManualStatuses()
public
getManualStatuses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —[Status => Label]
getNonblockerStatuses()
public
getNonblockerStatuses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —[Status => Label]
getPendingStatuses()
public
getPendingStatuses() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —[Status => Label]
getUnblockedTimeSlotsStatuses()
public
getUnblockedTimeSlotsStatuses() : array<string|int, string>
Tags
Return values
array<string|int, string> —hasStatus()
public
hasStatus(string $status) : bool
Parameters
- $status : string
Tags
Return values
bool —registerStatuses()
public
registerStatuses() : mixed
Tags
Return values
mixed —transitionStatus()
public
transitionStatus(string $newStatus, string $oldStatus, WP_Post $post) : mixed
Parameters
- $newStatus : string
- $oldStatus : string
- $post : WP_Post
Tags
Return values
mixed —addActions()
protected
addActions() : mixed
Tags
Return values
mixed —finishTransition()
protected
finishTransition(string $newStatus, string $oldStatus, Booking $booking) : mixed
Parameters
- $newStatus : string
- $oldStatus : string
- $booking : Booking
Tags
Return values
mixed —initStatuses()
protected
initStatuses() : mixed
Tags
Return values
mixed —isNewPost()
protected
isNewPost(string $oldStatus) : bool
Parameters
- $oldStatus : string
Tags
Return values
bool —notifyTransition()
protected
notifyTransition(string $newStatus, string $oldStatus, AbstractEntity $entity) : mixed
Parameters
- $newStatus : string
- $oldStatus : string
- $entity : AbstractEntity