Reserve service

The class JWeilandReserveServiceReserveService is the official public API for ext:reserve. You can use this class in your own extension to get some information like remaining participants of a period.

The following example shows a controller that uses FlexForms or TypoScript for Facility and DateTime selection. This selection will be used to get the remaining participants of a matching period.



 * This file is part of the package my/example.
 * For the full copyright and license information, please read the
 * LICENSE file that was distributed with this source code.

namespace My\Example\Controller;

use JWeiland\Reserve\Service\ReserveService;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;

class ExampleController extends ActionController
     * @var ReserveService
    protected $reserveService;

    public function __construct(ReserveService $reserveService)
        $this->reserveService = $reserveService;

    public function showAction(): void
        $dateTime = new \DateTime();
            $this->reserveService->getRemainingParticipants((int)$this->settings['facility'], $dateTime)

The FlexForms.xml may look like this.

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
                  <label>Date of the event</label>
                     <label>Choose a Facility</label>