Bookings
extends Master
in package
implements
WithIncludes, WithConfig
Implement interfaces for bookings and locations
Tags
Interfaces, Classes, Traits and Enums
- WithIncludes
- WithConfig
- Define implementation details for 3 configuration related endpoints
Table of Contents
- $request : Request|null
- $endpoint : Endpoint|null
- $response : Response|null
- $setup : Widget|null
- $_bookingsDb : BookingsDBAL|null
- $_calendarDb : CalendarDBAL|null
- $git_repo : array<string|int, mixed>
- $name : string
- $settings : object|null
- __construct() : mixed
- Needs to be there even if it is empty
- BookSpeakersRoom() : mixed
- CancelRoomBooking() : void
- ConfirmRoomBooking() : void
- Copy() : mixed
- Create() : mixed
- CreateResourceExtra() : mixed
- DeleteResourceExtra() : mixed
- Drop() : mixed
- EmployeeCancelRoomBooking() : void
- EmployeeConfirmRoomBooking() : void
- EmployeeFetchBundleArticles() : mixed
- EmployeeFetchRoomGuests() : void
- EmployeeFindRoomEmployee() : void
- EmployeeRoomBookingBasket() : void
- EmployeeRoomBookingSendMail() : void
- EmployeeUpdateRoomBooking() : void
- Endpoint() : Endpoint|null
- Get/Set endpoint
- FetchBundleArticles() : void
- FetchRoomGuests() : void
- FindRoomEmployee() : void
- Get() : mixed
- GetAttendanceRate() : mixed
- GetConfig() : void
- Endpoint handler to fetch the config
- GetConfigPreset() : void
- Endpoint handler to get the config data form template
- GetCustomersMap() : mixed
- GetRelatedEvent() : mixed
- GetResourceExtra() : mixed
- GetResourceExtras() : void
- GetRooms() : void
- GetSpeakers() : mixed
- GitRepo() : Git
- Git object
- Initial() : mixed
- MoveRoomGuests() : mixed
- RegisterIncludes() : array<string|int, mixed>
- Register includes on add the widget to certain page
- Request() : Request
- The request Sets or gets the widget request object
- Response() : Response
- Response object Get / Set the widget response
- RoomBookingBasket() : void
- RoomBookingSendMail() : void
- SaveConfig() : void
- Endpoint handler to update the config
- Search() : void
- SearchBookingBaskets() : void
- SearchBookings() : void
- SendAllWaitListReminder() : void
- SendConfirmationMail() : void
- SendWaitListReminder() : mixed
- SetCompleted() : mixed
- Setup() : Widget|null
- Get/Set the widget context
- TestOpenSpace() : mixed
- Update() : mixed
- UpdateResourceExtra() : void
- ConfigGet() : void
- Get a configuration by name
- ConfigGetPreset() : void
- Get the configuration preset data
- ConfigGetRaw() : Result
- Get configuration data as object from setup handler
- ConfigSave() : void
- Store a configuration with values from body and a given name
- CopyEntity() : void
- copy a single content links the frontend to the copy handler for single contents identified by rest end point argument
- CreateEntity() : mixed
- create new object
- deleteEntity() : void
- Delete a single content
- fetchAssignedEntityList() : mixed
- fetchEntityList() : void
- Fetch list of entries Use the direct loader method to retrieve a list obf objects
- fetchEntityListFiltered() : void
- Fetch filtered list
- fetchObject() : BaseContent|bool|null
- Retrieve an object from storage
- handleSubViewList() : mixed
- Handle the list/object loading for sub view of contents
- loadSingleEntity() : void
- load a single content implements the loader for single contents identified by rest end point argument
- prepareObjectLogs() : void
- Prepare the object comment and arguments for changes in diff
- UpdateEntity() : void
- Update a single content
- _basketOfRoomBooking() : void
- _cancelRoomBooking() : void
- _confirmRoomBooking() : void
- _fetchBundleArticles() : void
- Fetch bundle articles of article
- _fetchRoomGuests() : void
- Resolve guest in a certain room
- _findRoomEmployee() : void
- _sendConfirmRoomBooking() : void
- _sendWaitListReminder() : Result
- _updateRoomBooking() : void
- bookingsDb() : BookingsDBAL
- calendarDb() : CalendarDBAL
- open() : BookableResource|null
Properties
$request
public
Request|null
$request
= null
$endpoint
protected
Endpoint|null
$endpoint
= null
$response
protected
Response|null
$response
= null
$setup
protected
Widget|null
$setup
= null
$_bookingsDb
private
BookingsDBAL|null
$_bookingsDb
= null
$_calendarDb
private
CalendarDBAL|null
$_calendarDb
= null
$git_repo
private
array<string|int, mixed>
$git_repo
= array()
$name
private
string
$name
= 'bookings'
$settings
private
object|null
$settings
= null
Methods
__construct()
Needs to be there even if it is empty
public
__construct() : mixed
Return values
mixed —BookSpeakersRoom()
public
BookSpeakersRoom() : mixed
Return values
mixed —CancelRoomBooking()
public
CancelRoomBooking() : void
Return values
void —ConfirmRoomBooking()
public
ConfirmRoomBooking() : void
Tags
Return values
void —Copy()
public
Copy() : mixed
Return values
mixed —Create()
public
Create() : mixed
Return values
mixed —CreateResourceExtra()
public
CreateResourceExtra() : mixed
Return values
mixed —DeleteResourceExtra()
public
DeleteResourceExtra() : mixed
Return values
mixed —Drop()
public
Drop() : mixed
Return values
mixed —EmployeeCancelRoomBooking()
public
EmployeeCancelRoomBooking() : void
Return values
void —EmployeeConfirmRoomBooking()
public
EmployeeConfirmRoomBooking() : void
Tags
Return values
void —EmployeeFetchBundleArticles()
public
EmployeeFetchBundleArticles() : mixed
Return values
mixed —EmployeeFetchRoomGuests()
public
EmployeeFetchRoomGuests() : void
Return values
void —EmployeeFindRoomEmployee()
public
EmployeeFindRoomEmployee() : void
Return values
void —EmployeeRoomBookingBasket()
public
EmployeeRoomBookingBasket() : void
Return values
void —EmployeeRoomBookingSendMail()
public
EmployeeRoomBookingSendMail() : void
Return values
void —EmployeeUpdateRoomBooking()
public
EmployeeUpdateRoomBooking() : void
Tags
Return values
void —Endpoint()
Get/Set endpoint
public
Endpoint([Endpoint|null $endpoint = null ]) : Endpoint|null
Sets or gets the widget arguments, they contain the endpoint this widget was called at
Parameters
- $endpoint : Endpoint|null = null
-
A system request list
Return values
Endpoint|null —A system endpoint object
FetchBundleArticles()
public
FetchBundleArticles() : void
Return values
void —FetchRoomGuests()
public
FetchRoomGuests() : void
Return values
void —FindRoomEmployee()
public
FindRoomEmployee() : void
Return values
void —Get()
public
Get() : mixed
Return values
mixed —GetAttendanceRate()
public
GetAttendanceRate() : mixed
Return values
mixed —GetConfig()
Endpoint handler to fetch the config
public
GetConfig() : void
Return values
void —GetConfigPreset()
Endpoint handler to get the config data form template
public
GetConfigPreset() : void
Return values
void —GetCustomersMap()
public
GetCustomersMap() : mixed
Return values
mixed —GetRelatedEvent()
public
GetRelatedEvent() : mixed
Return values
mixed —GetResourceExtra()
public
GetResourceExtra() : mixed
Return values
mixed —GetResourceExtras()
public
GetResourceExtras() : void
Return values
void —GetRooms()
public
GetRooms() : void
Return values
void —GetSpeakers()
public
GetSpeakers() : mixed
Return values
mixed —GitRepo()
Git object
public
GitRepo([string $path = 'data' ]) : Git
Gets the widget git instance, either for config or, for data repo
Parameters
- $path : string = 'data'
-
The target repo, default is data
Return values
Git —A system git object with data folder as start point
Initial()
public
Initial() : mixed
Return values
mixed —MoveRoomGuests()
public
MoveRoomGuests() : mixed
Return values
mixed —RegisterIncludes()
Register includes on add the widget to certain page
public
RegisterIncludes(Request $request) : array<string|int, mixed>
Parameters
- $request : Request
Return values
array<string|int, mixed> —Request()
The request Sets or gets the widget request object
public
Request([Request|null $request = null ]) : Request
Parameters
- $request : Request|null = null
-
A system request object
Return values
Request —A system request object
Response()
Response object Get / Set the widget response
public
Response([Response|null $response = null ]) : Response
Parameters
- $response : Response|null = null
Return values
Response —A system response object
RoomBookingBasket()
public
RoomBookingBasket() : void
Return values
void —RoomBookingSendMail()
public
RoomBookingSendMail() : void
Return values
void —SaveConfig()
Endpoint handler to update the config
public
SaveConfig() : void
Return values
void —Search()
public
Search() : void
Return values
void —SearchBookingBaskets()
public
SearchBookingBaskets() : void
Return values
void —SearchBookings()
public
SearchBookings() : void
Return values
void —SendAllWaitListReminder()
public
SendAllWaitListReminder() : void
Return values
void —SendConfirmationMail()
public
SendConfirmationMail() : void
Return values
void —SendWaitListReminder()
public
SendWaitListReminder() : mixed
Return values
mixed —SetCompleted()
public
SetCompleted() : mixed
Return values
mixed —Setup()
Get/Set the widget context
public
Setup([Widget|null $setup = null ]) : Widget|null
Parameters
- $setup : Widget|null = null
Return values
Widget|null —TestOpenSpace()
public
TestOpenSpace() : mixed
Return values
mixed —Update()
public
Update() : mixed
Return values
mixed —UpdateResourceExtra()
public
UpdateResourceExtra() : void
Return values
void —ConfigGet()
Get a configuration by name
protected
ConfigGet(string $name) : void
Parameters
- $name : string
-
The name of the config file
Return values
void —ConfigGetPreset()
Get the configuration preset data
protected
ConfigGetPreset(string $name) : void
Parameters
- $name : string
-
The name of the config file
Return values
void —ConfigGetRaw()
Get configuration data as object from setup handler
protected
ConfigGetRaw(string $name) : Result
Parameters
- $name : string
-
The name of the config file
Return values
Result —ConfigSave()
Store a configuration with values from body and a given name
protected
ConfigSave(string $name) : void
Parameters
- $name : string
-
The name of the config file
Return values
void —CopyEntity()
copy a single content links the frontend to the copy handler for single contents identified by rest end point argument
protected
CopyEntity(array<string|int, mixed>|string $type, int|string $epIndex) : void
Parameters
- $type : array<string|int, mixed>|string
-
The requested content type
- $epIndex : int|string
-
Parse this parameter as id
Return values
void —CreateEntity()
create new object
protected
CreateEntity(string $type) : mixed
this method creates a new instance of a specific system content type
Parameters
- $type : string
-
A registered system content type
Return values
mixed —deleteEntity()
Delete a single content
protected
deleteEntity(string|array<string|int, string> $type, int|string $epIndex) : void
Implements the delete handler for single contents identified by rest end point argument
Parameters
- $type : string|array<string|int, string>
-
The requested content type
- $epIndex : int|string
-
Parse this parameter as id
Return values
void —fetchAssignedEntityList()
protected
fetchAssignedEntityList( $list[, null $language = null ]) : mixed
Parameters
Tags
Return values
mixed —fetchEntityList()
Fetch list of entries Use the direct loader method to retrieve a list obf objects
protected
fetchEntityList(string $type[, bool $raw = false ]) : void
Parameters
- $type : string
-
Fetch list of elements
- $raw : bool = false
-
Return as raw object and not plain
Return values
void —fetchEntityListFiltered()
Fetch filtered list
protected
fetchEntityListFiltered(string|array<string|int, string> $type[, array<string|int, mixed>|null $extra_payload = null ]) : void
Implements the server side data tables processing functions Supports free text search, paging and ordering at the moment
Parameters
- $type : string|array<string|int, string>
-
The requested content type(s)
- $extra_payload : array<string|int, mixed>|null = null
-
Additional filter operators
Return values
void —fetchObject()
Retrieve an object from storage
protected
fetchObject(int|string $id, string|array<string|int, string> $type[, string $right = 'view' ]) : BaseContent|bool|null
Load a single content from storage as instance If object was not found it will set the 404 error code
Parameters
- $id : int|string
-
A object id
- $type : string|array<string|int, string>
-
A object type
- $right : string = 'view'
-
An access level to test against
Return values
BaseContent|bool|null —A base content or null when not found or false when not access
handleSubViewList()
Handle the list/object loading for sub view of contents
protected
handleSubViewList(array<string|int, mixed> $payload) : mixed
Parameters
- $payload : array<string|int, mixed>
-
The request payload parent_type string Name of the parent type to manage inside parent string/int The id of the parent content attr string The attribute name to manage type string Type of the content to assign elements array List of elements when type is __multi content int Id when a direct content edit is performed (e.g. in child contents)
Tags
Return values
mixed —loadSingleEntity()
load a single content implements the loader for single contents identified by rest end point argument
protected
loadSingleEntity(string $type, int|string $epIndex[, string|null $language = null ]) : void
Parameters
- $type : string
-
The requested content type
- $epIndex : int|string
-
Parse this parameter as id
- $language : string|null = null
-
Language code to fetch element in
Return values
void —prepareObjectLogs()
Prepare the object comment and arguments for changes in diff
protected
prepareObjectLogs(BaseContent $item) : void
Parameters
- $item : BaseContent
Return values
void —UpdateEntity()
Update a single content
protected
UpdateEntity(string|array<string|int, string> $type, int|string $epIndex[, bool $return = false ]) : void
Implements the update handler for single contents identified by rest end point argument Does return the values when config option says so
Parameters
- $type : string|array<string|int, string>
-
The requested content type or, a list of allowed types
- $epIndex : int|string
-
Parse this parameter as id
- $return : bool = false
Return values
void —_basketOfRoomBooking()
private
_basketOfRoomBooking(Article $article, string $room_id) : void
Parameters
- $article : Article
- $room_id : string
Return values
void —_cancelRoomBooking()
private
_cancelRoomBooking(Article $article, string $room_id) : void
Parameters
- $article : Article
- $room_id : string
Return values
void —_confirmRoomBooking()
private
_confirmRoomBooking(Article $article, string $room_id[, User|null $teacher = null ]) : void
Parameters
Tags
Return values
void —_fetchBundleArticles()
Fetch bundle articles of article
private
_fetchBundleArticles(Article $article) : void
Parameters
- $article : Article
Return values
void —_fetchRoomGuests()
Resolve guest in a certain room
private
_fetchRoomGuests(Article $article) : void
Parameters
- $article : Article
Return values
void —_findRoomEmployee()
private
_findRoomEmployee(Article $article[, User|null $teacher = null ]) : void
Parameters
Return values
void —_sendConfirmRoomBooking()
private
_sendConfirmRoomBooking(Article $article, string $room_id[, User|null $teacher = null ][, array<string|int, mixed>|null $match = null ]) : void
Parameters
- $article : Article
- $room_id : string
- $teacher : User|null = null
- $match : array<string|int, mixed>|null = null
Return values
void —_sendWaitListReminder()
private
_sendWaitListReminder(Basket $basket) : Result
Parameters
- $basket : Basket
Return values
Result —_updateRoomBooking()
private
_updateRoomBooking(Article $article, string $room_id[, User|null $teacher = null ]) : void
Parameters
Tags
Return values
void —bookingsDb()
private
bookingsDb() : BookingsDBAL
Return values
BookingsDBAL —calendarDb()
private
calendarDb() : CalendarDBAL
Return values
CalendarDBAL —open()
private
open() : BookableResource|null