CoolCMS API

BookingDefaultTrait

The only presenter action (`default`): mounts the booking wizard or the "booking disabled" message.

See the BookingPresenter docblock.

Table of Contents

Properties

$bookingWizardFactory  : BookingWizardFactory
$bookingEnabled  : bool
Returns whether booking is allowed on this page.

Methods

actionDefault()  : void
createComponentFrontCompanyBookingWizard()  : BookingWizard
`{control frontCompanyBookingWizard}`; the name is global even though only this page uses it (convention `front<Module><Component>`).
renderDefault()  : void

Properties

$bookingEnabled

Returns whether booking is allowed on this page.

private bool $bookingEnabled = false

Held as a bool, not as the company entity: the presenter needs nothing else from the presented company (the component fetches calendars and availability through the Api), and the entity would need a generic type that differs for findPresented().

Methods

createComponentFrontCompanyBookingWizard()

`{control frontCompanyBookingWizard}`; the name is global even though only this page uses it (convention `front<Module><Component>`).

public createComponentFrontCompanyBookingWizard() : BookingWizard

IMPORTANT: nothing is passed to the component from the presenter. Its persistent parameters hold the state (month, day, calendar); otherwise an AJAX redraw would render empty.

Return values
BookingWizard
On this page

Search results