blueways/bw-bookingmanager

A generic bookingmanager

Installs: 3 251

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 2

Language:TypeScript

Type:typo3-cms-extension

v11.1.0 2023-06-11 17:59 UTC

README

Install

  • via composer
composer require blueways/bw-bookingmanager
  • include TypoScript setup and constants
  • include route enhancer in site config:
imports:
  - resource: 'EXT:bw_bookingmanager/Configuration/Routing/Api.yaml'
  - resource: 'EXT:bw_bookingmanager/Configuration/Routing/Ics.yaml'

Usage

To create a new calendar

  • Create a new SysFolder and use it as container for "Booking Manager"
  • Add a new Calendar to the folder
  • Create timeslots for the calendar or enable direct booking in calendar settings

Notifications

To send automated emails, add a new Notification record inside a SysFolder and select the event and calendars you want to be notified about.

E-Mail Templates

The template can be selected in the Notification settings. To modify the available templates, use PageTS:

TCEFORM.tx_bwbookingmanager_domain_model_notification {
  template.addItems {
    welcome = Welcome Template
  }
}

Emails are send through the TYPO3 Mail API. To use custom email templates, add your template directory to the TYPO3 configuration and make sure the configured template name exists:

$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][108] = 'EXT:extension/Resources/Private/Templates/Email';

Conditional notifications

To add a new condition in the backend, register a new checkbox item via TCA:

$GLOBALS['TCA']['tx_bwbookingmanager_domain_model_notification']['columns']['conditions']['items'][] = [
    'New condition name', \Vendor\Extension\NotificationCondition\TheNewCondition::class
];

The value of the item should be a class name that implements the NotificationConditionInterface.

class TheNewCondition implements NotificationConditionInterface
{

    public function doSend(Entry $entry): bool
    {
        // ...logic

        // prevent sending of email
        return false;
    }
}

API

There a various ways to extend or modify the behavior of the booking manager.

Events

There are PSR-14 events dispatched which offer a way to execute custom functionality

  • AfterEntryCreationEvent

Changelog

  • Confirmation mails not configured via TypoScript anymore - create a separate Notification