Skip to content

omnibase/restaurant API reference

Floor
Prepared structure · Omnibase
Version
main
Verified for real
Its README does not say
Licence
MIT
composer require omnibase/restaurant:dev-main

Read from the package's own PHP files at the commit a8cc8ece1679: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Base\Restaurant

  • RestaurantBundle class

    A restaurant on omnibase: the dining room, the services and their reservations, the menu, ordering at the table and the pass - and the delivery and booking platforms through glitchr/omnifood when it is there.

    3 methods

Base\Restaurant\Admin\Widget

  • RestaurantReviewsWidgetType class

    What guests said lately on the review platforms (glitchr/omnireview): the latest reviews, and those not answered yet where the platform tells (the owner's side: Google Business Profile, Trustpilot). Empty - the tile shows nothing - without the family or without a configured gateway.

    4 methods

  • RestaurantTodayWidgetType class

    The day at a glance: covers booked, reservations to confirm, tickets on the pass.

    4 methods

Base\Restaurant\Controller\Admin

  • FloorController class

    The manager's room screens in the back office (they open in the nest, on @Admin/layout.html.twig): the floor editor - the room drawn to scale in SVG, tables dragged on a snapping grid, turned, duplicated, joined in a layout, walls and the counter drawn, saved as JSON (public/js/floor.js) - and the QR posters of the tables, an A4 page each or labels (glitchr/omnibase's QrSheet), a table's code renewed.

    7 methods

  • OpenToManagersTrait trait

    The restaurant's screens are written by its manager (ROLE_ADMIN), not only by the super-admin omnibase/admin requires by default for anything that writes - as omnibase/classroom and omnibase/estate do.

Base\Restaurant\Controller\Admin\Crud

  • DishCrudController class

    The dishes: the shop's product screen, and what a menu says besides (native name, section, allergens, diets, spice, station).

    4 methods

  • LayoutCrudController class

    The layouts by name; the tables are moved and joined in the floor editor.

    4 methods

  • MealServiceCrudController class

    The meal services: days, first and last seating, step, how long a table is kept by party size, covers in all, automatic confirmation, layout.

    4 methods

  • MenuSectionCrudController class

    The menu's sections, in their order.

    4 methods

  • ReservationCrudController class

    The reservation book as a list (the pass is where the evening is run).

    6 methods

  • RoomCrudController class

    The rooms: a name, a size; the tables and the walls are drawn in the floor editor (/admin/restaurant/salle).

    4 methods

  • SetMenuCrudController class

    The set menus: a dish whose courses are listed, served at one service when it says so.

    3 methods

  • TableCrudController class

    The tables as a list; their places are set in the floor editor.

    5 methods

  • TakeHomeCrudController class

    The take-home shop's dishes - fresh, frozen, or kept on a shelf: the shop's product screen (title, text, price before VAT, stock, availability) with how each is kept and for how long, how it is cooked at home, and whether it travels in a chilled parcel.

    3 methods

  • TicketCrudController class

    The tickets as they were: read only (the pass moves them).

    5 methods

Base\Restaurant\Controller\Client

  • MenuController class

    The menu, to read: by section, each dish with its name in the kitchen's language, its price, its allergens (filterable: "sans gluten, sans lait" hides what has them) and its diets; and the same on paper.

    3 methods

  • PassController class

    Le passe (/service): the floor's one screen, a page of the site for the staff (restaurant.staff_role). It draws the board (Service\Pass), asks its state every few seconds (glitchr/omnibase's poll controller: "revision" redraws, "latest" rings for a ticket to accept), and takes the staff's taps - each a POST with the pass's token, answered with the new state when asked from the page's script, with the page otherwise.

    10 methods

  • PlatformWebhookController class

    Where a delivery or booking platform calls (glitchr/omnifood): its signature checked by the platform's package - 401 and nothing done when it does not hold -, the order made a ticket on the pass, the reservation put in the book. Answered 200 once handled; 502 when the platform could not be asked for the order (it retries: the event is not marked as seen).

    2 methods

  • ReservationController class

    Booking a table on the site, and the guest's own page for it: the form (a day, how many, a time among those free, who), then the reservation through its link - see it, move it, cancel it, add it to a calendar.

    5 methods

  • TableController class

    What a table's QR code opens (/t/{token}): the menu in ordering mode on the guests' phones, the table's bill joined (no account), rounds sent to the pass, the waiter called, the bill asked for - and where each round stands. The token is the only key: a poster reprinted with a new token locks the old one out. Each table's phones get so many requests a minute (symfony/rate-limiter, restaurant.table.rate_limit).

    6 methods

  • TablePaymentController class

    "Payer depuis mon téléphone" (restaurant.table.pay_online): a table's phone pays its bill - an e-mail address for the receipt, then the shop's payment (Service\TablePayments). Answers where to go: the provider's page, or back to the table's, settled. Loaded only where omnibase/marketplace has its quick order.

    2 methods

  • TakeHomeController class

    The take-home shop: the fresh dishes to cook at home (/traiteur), a dish and how to cook it (/traiteur/{slug}), and an order followed through its link, without an account (/suivi/{token}). The order itself - without an account either - is TakeHomeOrderController's, where omnibase/marketplace offers its quick order.

    4 methods · 1 constant

  • TakeHomeOrderController class

    Ordering at the take-home shop, without an account: the form of /traiteur (Form\TakeHomeOrderType, guarded as glitchr/omnibase guards a form) posts here, the payment follows (omnibase/marketplace's quick order), and the customer ends on the page that follows the order (/suivi/{token}).

    2 methods

Base\Restaurant\Demo

  • RestaurantDemoAccounts class

    The demonstration accounts of a restaurant (glitchr/omnibase's `demo` environment): one for each of its people. The manager holds restaurant.manager_role - the floor plan, the menu, the services, the book; the floor team and the kitchen hold restaurant.staff_role through two groups, "Salle" and "Cuisine", as in a real restaurant (omnibase stores no ROLE_STAFF on an account) - both run the pass, the kitchen one station at a time (/service?poste=hot); the customer holds no role of the restaurant: the take-home shop, an order paid and followed.

    2 methods · 2 constants

Base\Restaurant\DependencyInjection

Base\Restaurant\Entity

  • Layout class

    A named arrangement of a room - "Midi", "Soir", "Privatisation": where each table stands, which tables are out, which are joined to seat a larger party. A meal service names its layout; a layout may also take over on given dates (a private party). The room's default layout serves when neither says.

    22 methods

  • MealService class

    A meal service - lunch, dinner: the days it runs, the first and last time a table may be booked, the step between two times, how long a table is kept by party size, how many covers it takes in all, up to how many a reservation is confirmed without the manager, and the layout of the room.

    33 methods

  • PlatformEvent class

    A platform's webhook already handled: platforms retry, and the same event (Omnifood\Model\Notification::$id) must make one ticket, not two.

    6 methods

  • Reservation class

    A table booked: when (the restaurant's wall-clock time: stored and read as such, whatever the visitor's time zone), for how many, who, what they asked for, its tables, where it came from - the site, the phone, a walk-in, a platform (its reference there). The guest manages it through its token (/reservation/{token}): see it, move it, cancel it, add it to a calendar.

    45 methods · 3 constants

  • Room class

    A dining room (or a terrace): its size in centimetres, what is drawn in it besides the tables - walls, the counter, the doors, the kitchen pass - and its tables. Its layouts move the tables around and join them for a service or a date (Layout).

    23 methods · 1 constant

  • Table class

    A table of a room: its label ("12", "C3"), how many it seats, its shape and its place on the plan (centimetres from the room's top left corner, its centre; degrees). Its token is what its QR code carries (/t/{token}): regenerated, the old posters stop working.

    39 methods

Base\Restaurant\Entity\Menu

  • Dish class

    A dish of the menu: an omnibase/marketplace product (its title and text, its price before VAT and the store's VAT, its stock and availability), with what a restaurant's menu says besides - its name in the kitchen's own language, a drawing until there is a photo, the EU allergens (Base\Enum\Allergen), the diets it suits, how hot it is, its section, and the station that makes it (the pass filters by it).

    33 methods

  • MenuSection class

    A part of the menu - "Entrées", "Ramen", "Boissons": an omnibase taxon (its label, translated, its slug, its icon), in the menu's order, with its name in the kitchen's own language under it.

    5 methods

  • SetMenu class

    A set menu at one price - "Teishoku du midi: le plat du jour, une soupe miso, un dessert": a dish whose courses are listed, served at one meal service only when it says so. Ordered like any dish; the courses are read on the ticket.

    7 methods

Base\Restaurant\Entity\Order

  • Session class

    A table's bill, from the first scan of its code to the till: the rounds (Ticket) its guests send, a call for the waiter, the bill asked for, then settled - at the till by default (cash, card), or from a phone where the site allows it. One open at a time per table; the next guests open a new one.

    32 methods

  • Ticket class

    What the kitchen makes, one ticket at a time, whatever it comes from: a round sent from a table (its Session), an order to take away, a delivery platform's order (Ticket::$platform, its reference there). Independent of omnibase/marketplace's orders and their states: a ticket is the kitchen's paper, it moves along TicketStatus.

    48 methods

  • TicketLine class

    One line of a ticket: so many of a dish, its options ("bien cuit", "sans oignons", "+ œuf"), a note, and the station that makes it. Its name and price are copied when it is sent: the menu may change, the ticket does not.

    16 methods

Base\Restaurant\Entity\Product

  • TakeHome class

    A dish to cook at home, sold by the restaurant's take-home shop - fresh, frozen, or kept on a shelf: an omnibase/marketplace product (title and text, price before VAT and its VAT - 5.5 % in France for food to take away that is not eaten at once -, stock, availability) with what such a dish says besides: how it is kept (Enum\Keeping) and at what temperature, how many days it keeps once made (its use-by date), its weight and portions, how to cook it, its allergens, and whether it may travel in a chilled parcel (Service\ColdChain).

    36 methods

Base\Restaurant\Enum

  • Diet enum

    What a dish suits, shown as pills and filtered on the menu (the allergens are glitchr/omnibase's Base\Enum\Allergen).

    3 methods · 4 cases

  • Keeping enum

    How a take-home dish is kept until it is cooked: on a shelf, in the fridge, or in the freezer. It says the temperature it is kept at by default and how it leaves the restaurant (a chilled or frozen dish goes in an insulated bag, and travels only in a chilled parcel).

    3 methods · 3 cases

  • ReservationStatus enum

    Where a reservation stands. Asked for (above the service's automatic confirmation, or from a platform that waits for an answer), confirmed, then the evening: seated, finished - or absent; cancelled by the guest or the restaurant, refused. The first three hold their tables.

    5 methods · 7 cases

  • SessionStatus enum

    A table's bill: open while the guests order, asked for, settled (at the till, or from a phone).

    2 methods · 3 cases

  • Station enum

    Where a dish is made: the hot kitchen, the cold side (sushi, salads, desserts), the bar. The pass filters by it.

    1 method · 3 cases

  • TableShape enum

    How a table is drawn on the floor plan. A counter is a row of stools: one seat per 60 cm.

    1 method · 4 cases

  • TicketChannel enum

    Where a ticket comes from: a table's phones, the counter (to take away), a delivery platform (Ticket::$platform names which).

    1 method · 3 cases

  • TicketStatus enum

    A ticket's way through the kitchen, whatever its channel:

    7 methods · 7 cases

Base\Restaurant\Event

  • DishAvailabilityEvent class

    A dish run out on the pass, or back: the Omnifood bridge suspends it on the platforms, or brings it back.

    1 method · 2 properties

  • ReservationChangedEvent class

    A reservation taken, moved or moved along (confirmed, seated, cancelled...).

    1 method · 3 properties

  • TicketMovedEvent class

    A ticket arrived (from null) or moved along on the pass. The Omnifood bridge tells the platform of a platform's order (accepted, denied, ready).

    1 method · 4 properties

Base\Restaurant\EventListener

  • QuickOrderListener class

    What omnibase/marketplace's quick orders are to the restaurant: an order paid settles the table's bill it pays (when the payment came back from a provider: a card), and the page a quick order ends on is the restaurant's own - the table's page for a bill, the page that follows a take-home order.

    3 methods

  • RevisionListener class

    Anything of the restaurant written: the revision the pass watches grows.

    3 methods

  • TakeawayListener class

    The shop's orders and the pass, both ways: a hand-over received (its order is paid) puts a ticket on the pass; the ticket moved there moves the hand-over its customer follows.

    3 methods

Base\Restaurant\Exception

  • RestaurantException class

    Something the guest or the staff should read: the message is a key of the "restaurant" translations, with its parameters.

    1 method · 1 property

  • TransitionException class

    A ticket or a reservation asked to go where its status does not lead.

  • UnavailableException class

    No table for that many at that time any more: someone booked it meanwhile, or the time is not offered. The message is a key of the "restaurant" translations.

Base\Restaurant\Form

  • BookingType class

    The public reservation form, on a model (Model\Booking): the day, how many, the time among those offered (the page fills them as the day and the size change), who, what they ask, and glitchr/omnibase's data-protection notice. Guarded as glitchr/omnibase guards a form (its option `guard`, action "book"): a trap, the time it takes, the lists, the captcha when the site has glitchr/omnishield.

    3 methods

  • TakeHomeOrderType class

    An order of the take-home shop (/traiteur/commander), as its page's form posts it: the dishes and how many (lines[<dish id>]), how it leaves and when, who. A root form without a name (createNamed('')): its fields keep the page's names - email, lines[12], day. Guarded as glitchr/omnibase guards a public form (its option `guard`, action "takehome": a trap, the time it takes, the lists, the captcha when the site has glitchr/omnishield), in place of the page's own trap. Its fields are validated as Model\TakeHomeOrder's constraints say.

    3 methods

Base\Restaurant\Model

  • BillPayment class

    What a phone sends to pay its table's bill (#[MapRequestPayload]): where the receipt goes.

    1 property

  • Booking class

    What the public reservation form holds (omnibase's FormFactory takes a model, not an entity): the day, the time, how many, who, what they ask.

    8 properties

  • Floor class

    The tables in use for a service on a day, and those pushed together - as the layouts of the rooms say (Service\FloorPlan).

    3 methods · 2 properties

  • HandOver class

    One way a take-home order may leave (Service\ColdChain::options()): whether this basket can go that way, why not when it cannot (a key of the "restaurant" translations), and the days it may be for.

    1 method · 5 properties

  • Round class

    A round sent from a table's phone (#[MapRequestPayload]): its lines, and a word for the kitchen.

    3 properties

  • RoundLine class

    One line of a round sent from a table's phone.

    2 methods · 4 properties

  • Slot class

    A time a party can be seated at, in which service, at which tables, for how long.

    3 methods · 5 properties

  • TakeHomeOrder class

    An order of the take-home shop as its form posts it (Form\TakeHomeOrderType): the dishes and how many, who, and how it leaves - collected on a slot, brought to a postcode nearby, or sent in a chilled parcel.

    1 method · 11 properties

Base\Restaurant\Omnifood

  • FoodKeysSection class

    The platforms' keys on omnibase/admin's API keys page, one group per platform the site configures (omnifood.platforms): typed there (api.food.<platform>.<option>), they win over the configuration - Platforms builds each platform with them.

    3 methods

  • MenuExport class

    The restaurant's menu in Omnifood's shape, for the delivery platforms: a category per section, an item per dish (its reference is the dish's slug - the one the orders carry back -, its price VAT included, its VAT rate, its EU allergens, its diets as labels), what is run out unavailable.

    3 methods

  • OrderTickets class

    A platform's order (Omnifood\Model\Order) made a ticket: its reference and short number, who ordered, the note, what was paid, when it was placed and is collected, until when it may be accepted (the platform's delay), and its lines - each tied to the menu's dish when the platform carries the restaurant's reference back (the dish's station then), its modifiers as the line's options. Nothing is read nor saved here.

    3 methods

  • PlatformHealth class

    How each platform's connection stands, for the pass: configured (every key its factory needs is set - in the configuration or typed in the back office), not configured (a key missing: nothing is called, the webhook answers 404), or in error (the last call or webhook failed - what the platform said, and when - until one succeeds). The failures are kept in the cache: a screen's indication, not a record.

    5 methods · 4 constants

  • PlatformSubscriber class

    What the pass does, told to the platforms: a platform's order accepted, denied, ready or cancelled; a dish run out (or back) on every platform whose menu it is on; a platform's reservation seated, finished, absent or cancelled. A platform that fails is logged and marked in error on the pass (PlatformHealth) until a call succeeds: the pass goes on (the restaurant's tablet from the platform is the fallback).

    4 methods · 1 constant

  • Platforms class

    The restaurant's platforms (glitchr/omnifood's Registry), each built with the keys typed in the back office over the configured ones - settings api.food.<platform>.<option> (Settings\FoodKeysSection declares the fields), as omnibase/marketplace does for its payment gateways.

    14 methods · 2 constants

  • Receiver class

    A platform's webhook, made into the restaurant's own: an order becomes a ticket on the pass (channel "platform", its reference there), a cancellation cancels it; a reservation joins the book (source: the platform), at the tables that fit. Each event once: the platforms retry, Notification::$id is kept (PlatformEvent).

    4 methods

Base\Restaurant\Omnifood\Command

  • MenuPushCommand class

    The menu sent to the delivery platforms (each replaces its own): all of them, or the one named.

    1 method

  • ReservationsSyncCommand class

    The booking platforms' reservations read and put in the book - what their webhooks missed. Run by the cron container every few minutes.

    1 method

Base\Restaurant\Repository

Base\Restaurant\Reviews

  • RestaurantReviews class

    The restaurant on the review platforms (glitchr/omnireview): where it is on each (restaurant.reviews.places), its latest reviews, those it has not answered. Everything is asked through the family's Twig functions (OmnireviewExtension): kept no longer than each platform allows, nothing when a platform does not answer. A platform whose gateway is not configured - no key - is left out: nothing shows.

    6 methods

Base\Restaurant\Service

  • Availability class

    The reservation book's free times and its taking: Seating reckons, this reads the day (its services, its layouts, the reservations holding tables) and writes the reservation under a lock on the day - two guests taking the last table at the same second get it once (symfony/lock).

    10 methods

  • ColdChain class

    How fresh dishes may leave the restaurant. omnibase/marketplace hands an order over (Entity\Order\Pickup) and offers every shipping method to every basket; what may travel cold, and when, is decided here:

    9 methods

  • FloorPlan class

    Which layout each room is in for a service on a day - one taking over that date, else the service's (when it is this room's), else the room's default, else the tables where they stand - and so the tables in use and those joined.

    4 methods

  • ParcelCarrier class

    Who carries the chilled parcels: the shop's shipping method named by restaurant.parcel.shipping_method (its slug), whose carrier is a glitchr/omnibus gateway - omnibus/chronopost with the Chronofresh product.

    3 methods

  • Pass class

    "Le passe": the one screen the floor runs on. The room as it is now - each table free, booked soon, seated, waiting for the kitchen, with something ready, calling, asking for the bill -, the tickets of every channel in columns (to accept, in the kitchen, ready, served), the day's reservations; and what the staff do there: move a ticket along, settle a table, move guests to another table, run a dish out.

    13 methods · 1 constant

  • Reservations class

    The reservation book's actions: a guest's request from the site, the staff's from the phone, the guest's change and cancellation through the management link, the evening's steps on the pass. Each one dispatched (ReservationChangedEvent) and, for the guest, mailed: the confirmation carries the management link and the calendar file (glitchr/omnibase's Ics).

    10 methods

  • Revision class

    One number that grows whenever the floor changes - a reservation, a bill, a ticket written (EventListener\RevisionListener): the pass and the guests' phones ask it every few seconds (the poll controller) and redraw when it has grown. Milliseconds, kept in the cache: no query to answer it.

    3 methods

  • Seating class

    Where and when a party fits - the reckoning alone, nothing read nor written (Availability does that, under a lock):

    5 methods

  • TableOrders class

    Ordering at the table, as in Japan: the guests scan their table's code, which opens (or joins) the table's bill - no account, no app - and send their rounds from their phones, call the waiter, ask for the bill. Each round is a ticket on the pass, waiting to be accepted there. The prices are the menu's, VAT included (omnibase/marketplace's Pricing), copied on the ticket when it is sent.

    7 methods

  • TablePayments class

    A table's bill paid from a phone (restaurant.table.pay_online): the billed rounds become the lines of an omnibase/marketplace order - no account: an e-mail address for the receipt -, paid through the shop's gateways (QuickOrder::buy()); paid, the bill is settled "online" and the table is free, as at the till (Pass::settle()).

    6 methods

  • TakeHomeOrders class

    An order of the take-home shop, without an account: the dishes, an e-mail address, how it leaves. The cold chain says whether it may leave that way on that day (Service\ColdChain); omnibase/marketplace's quick order makes the order for the address and takes the payment (QuickOrder::buy()); its hand-over is written (Pickup: the mode, the day and slot, who, where) and the customer follows it on /suivi/{token}. Paid, it is a ticket on the pass (Service\TakeawayTickets).

    5 methods

  • TakeawayTickets class

    The shop's orders on the pass. A paid order with a hand-over (omnibase/marketplace's Pickup, received) that holds the restaurant's products - take-home dishes, dishes of the menu - becomes a ticket of the "takeaway" channel, to accept and prepare like any other; and as the ticket moves, so does the hand-over the customer follows on /suivi/{token}: accepted, in preparation, ready, then handed over - or on its way, for a delivery or a parcel.

    4 methods

Base\Restaurant\Twig

  • ReviewsTwigExtension class

    restaurant_reviews(): the platforms the restaurant's page shows reviews from - none without glitchr/omnireview, none without a configured gateway. restaurant_review_widget(gateway, place): the family's own widget (omnireview_widget(), @Omnireview/reviews.html.twig), named here so that the bundle's templates compile on a site without the family.

    2 methods

Base\Restaurant

RestaurantBundle class

class RestaurantBundle extends AbstractBaseBundle RestaurantBundle.php:14

A restaurant on omnibase: the dining room, the services and their reservations, the menu, ordering at the table and the pass - and the delivery and booking platforms through glitchr/omnifood when it is there.

RestaurantBundle::__construct()

public function __construct()

RestaurantBundle::getPath()

public function getPath(): string

RestaurantBundle::build()

public function build(ContainerBuilder $container): void

Base\Restaurant\Admin\Widget

RestaurantReviewsWidgetType class

final class RestaurantReviewsWidgetType implements DashboardWidgetTypeInterface RestaurantReviewsWidgetType.php:17

What guests said lately on the review platforms (glitchr/omnireview): the latest reviews, and those not answered yet where the platform tells (the owner's side: Google Business Profile, Trustpilot). Empty - the tile shows nothing - without the family or without a configured gateway.

yield MenuItem::block('restaurant_reviews', 'Avis', 'fa-solid fa-star')->setSize(4);

RestaurantReviewsWidgetType::__construct()

public function __construct(readonly ?RestaurantReviews $reviews = null)

RestaurantReviewsWidgetType::getName()

public static function getName(): string

RestaurantReviewsWidgetType::getTemplate()

public function getTemplate(): string

RestaurantReviewsWidgetType::getTemplateVars()

public function getTemplateVars(MenuItem $widget): array

RestaurantTodayWidgetType class

final class RestaurantTodayWidgetType implements DashboardWidgetTypeInterface RestaurantTodayWidgetType.php:12

The day at a glance: covers booked, reservations to confirm, tickets on the pass.

RestaurantTodayWidgetType::__construct()

public function __construct(readonly ReservationRepository $reservations, readonly TicketRepository $tickets, readonly Availability $availability)

RestaurantTodayWidgetType::getName()

public static function getName(): string

RestaurantTodayWidgetType::getTemplate()

public function getTemplate(): string

RestaurantTodayWidgetType::getTemplateVars()

public function getTemplateVars(MenuItem $widget): array

Base\Restaurant\Controller\Admin

FloorController class

class FloorController extends AbstractController FloorController.php:32

The manager's room screens in the back office (they open in the nest, on @Admin/layout.html.twig): the floor editor - the room drawn to scale in SVG, tables dragged on a snapping grid, turned, duplicated, joined in a layout, walls and the counter drawn, saved as JSON (public/js/floor.js) - and the QR posters of the tables, an A4 page each or labels (glitchr/omnibase's QrSheet), a table's code renewed.

FloorController::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly RoomRepository $rooms, readonly TableRepository $tables, readonly FloorPlan $plans, readonly AdminContext $adminContext, readonly MenuBuilder $menuBuilder, readonly string $managerRole = 'ROLE_ADMIN', readonly string $posterColor = '#432B52')

FloorController::index()

public function index(Request $request): Response

FloorController::newRoom()

public function newRoom(Request $request): Response

FloorController::newLayout()

public function newLayout(Request $request, Room $room): Response

FloorController::save()

public function save(Request $request, Room $room): JsonResponse

The editor's save: the room's size and decor, the tables (new, changed, removed), and - in a layout - their places there and the joins.

FloorController::posters()

public function posters(Request $request, QrSheet $sheet): Response

The QR posters: one A4 page per table, or labels (L7121, L7160, L7163); ?salle= one room, ?skip= labels already used.

FloorController::token()

public function token(Request $request, Table $id): Response

A table's code renewed: its printed poster stops working.

OpenToManagersTrait trait

trait OpenToManagersTrait OpenToManagersTrait.php:13

The restaurant's screens are written by its manager (ROLE_ADMIN), not only by the super-admin omnibase/admin requires by default for anything that writes - as omnibase/classroom and omnibase/estate do.

Base\Restaurant\Controller\Admin\Crud

DishCrudController class

class DishCrudController extends ProductCrudController DishCrudController.php:17

The dishes: the shop's product screen, and what a menu says besides (native name, section, allergens, diets, spice, station).

DishCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

DishCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

DishCrudController::configureFields()

public function configureFields(string $pageName): iterable

DishCrudController::menuFields()

public static function menuFields(): iterable

LayoutCrudController class

class LayoutCrudController extends AbstractCrudController LayoutCrudController.php:17

The layouts by name; the tables are moved and joined in the floor editor.

LayoutCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

LayoutCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

LayoutCrudController::configureActions()

public function configureActions(Actions $actions): Actions

LayoutCrudController::configureFields()

public function configureFields(string $pageName): iterable

MealServiceCrudController class

class MealServiceCrudController extends AbstractCrudController MealServiceCrudController.php:22

The meal services: days, first and last seating, step, how long a table is kept by party size, covers in all, automatic confirmation, layout.

When the restaurant opens at all, and its days off, are omnibase's hours.

MealServiceCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

MealServiceCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

MealServiceCrudController::configureActions()

public function configureActions(Actions $actions): Actions

MealServiceCrudController::configureFields()

public function configureFields(string $pageName): iterable

MenuSectionCrudController class

class MenuSectionCrudController extends AbstractCrudController MenuSectionCrudController.php:15

The menu's sections, in their order.

MenuSectionCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

MenuSectionCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

MenuSectionCrudController::configureActions()

public function configureActions(Actions $actions): Actions

MenuSectionCrudController::configureFields()

public function configureFields(string $pageName): iterable

ReservationCrudController class

class ReservationCrudController extends AbstractCrudController ReservationCrudController.php:21

The reservation book as a list (the pass is where the evening is run).

ReservationCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

ReservationCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

ReservationCrudController::configureCrud()

public function configureCrud(Crud $crud): Crud

ReservationCrudController::configureActions()

public function configureActions(Actions $actions): Actions

ReservationCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

ReservationCrudController::configureFields()

public function configureFields(string $pageName): iterable

RoomCrudController class

class RoomCrudController extends AbstractCrudController RoomCrudController.php:14

The rooms: a name, a size; the tables and the walls are drawn in the floor editor (/admin/restaurant/salle).

RoomCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

RoomCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

RoomCrudController::configureActions()

public function configureActions(Actions $actions): Actions

RoomCrudController::configureFields()

public function configureFields(string $pageName): iterable

SetMenuCrudController class

class SetMenuCrudController extends ProductCrudController SetMenuCrudController.php:12

The set menus: a dish whose courses are listed, served at one service when it says so.

SetMenuCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

SetMenuCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

SetMenuCrudController::configureFields()

public function configureFields(string $pageName): iterable

TableCrudController class

class TableCrudController extends AbstractCrudController TableCrudController.php:19

The tables as a list; their places are set in the floor editor.

TableCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

TableCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

TableCrudController::configureActions()

public function configureActions(Actions $actions): Actions

TableCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

TableCrudController::configureFields()

public function configureFields(string $pageName): iterable

TakeHomeCrudController class

class TakeHomeCrudController extends ProductCrudController TakeHomeCrudController.php:21

The take-home shop's dishes - fresh, frozen, or kept on a shelf: the shop's product screen (title, text, price before VAT, stock, availability) with how each is kept and for how long, how it is cooked at home, and whether it travels in a chilled parcel.

TakeHomeCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

TakeHomeCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

TakeHomeCrudController::configureFields()

public function configureFields(string $pageName): iterable

TicketCrudController class

class TicketCrudController extends AbstractCrudController TicketCrudController.php:16

The tickets as they were: read only (the pass moves them).

TicketCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

TicketCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

TicketCrudController::configureCrud()

public function configureCrud(Crud $crud): Crud

TicketCrudController::configureActions()

public function configureActions(Actions $actions): Actions

TicketCrudController::configureFields()

public function configureFields(string $pageName): iterable

Base\Restaurant\Controller\Client

MenuController class

class MenuController extends AbstractController MenuController.php:18

The menu, to read: by section, each dish with its name in the kitchen's language, its price, its allergens (filterable: "sans gluten, sans lait" hides what has them) and its diets; and the same on paper.

MenuController::__construct()

public function __construct(readonly DishRepository $dishes, readonly string $layout = 'layout1.html.twig')

MenuController::index()

public function index(): Response

MenuController::print()

public function print(): Response

PassController class

class PassController extends AbstractController PassController.php:35

Le passe (/service): the floor's one screen, a page of the site for the staff (restaurant.staff_role). It draws the board (Service\Pass), asks its state every few seconds (glitchr/omnibase's poll controller: "revision" redraws, "latest" rings for a ticket to accept), and takes the staff's taps - each a POST with the pass's token, answered with the new state when asked from the page's script, with the page otherwise.

PassController::__construct()

public function __construct(readonly Pass $pass, readonly Reservations $reservations, readonly EntityManagerInterface $entityManager, readonly TranslatorInterface $translator, readonly ?Platforms $platforms = null, readonly ?PlatformHealth $health = null, readonly string $staffRole = 'ROLE_STAFF', readonly string $layout = 'layout1.html.twig', readonly int $poll = 6)

PassController::index()

public function index(Request $request): Response

PassController::board()

public function board(Request $request): Response

PassController::state()

public function state(): JsonResponse

PassController::ticket()

public function ticket(Request $request, Ticket $id, string $action): Response

PassController::table()

public function table(Request $request, Table $id, string $action): Response

PassController::reservation()

public function reservation(Request $request, Reservation $id, string $action): Response

PassController::book()

public function book(Request $request): Response

A reservation taken on the phone, or a walk-in seated now.

PassController::dish()

public function dish(Request $request, Dish $id, string $action): Response

PassController::platform()

public function platform(Request $request, string $name, string $action): Response

PlatformWebhookController class

class PlatformWebhookController extends AbstractController PlatformWebhookController.php:24

Where a delivery or booking platform calls (glitchr/omnifood): its signature checked by the platform's package - 401 and nothing done when it does not hold -, the order made a ticket on the pass, the reservation put in the book. Answered 200 once handled; 502 when the platform could not be asked for the order (it retries: the event is not marked as seen).

404 without glitchr/omnifood or for a platform the site does not have. A webhook handled clears the platform's error on the pass; one that could not be handled marks it (PlatformHealth).

PlatformWebhookController::__construct()

public function __construct(readonly ?Receiver $receiver = null, readonly ?LoggerInterface $logger = null, readonly ?PlatformHealth $health = null)

PlatformWebhookController::__invoke()

public function __invoke(Request $request, string $name): JsonResponse

ReservationController class

class ReservationController extends AbstractController ReservationController.php:25

Booking a table on the site, and the guest's own page for it: the form (a day, how many, a time among those free, who), then the reservation through its link - see it, move it, cancel it, add it to a calendar.

ReservationController::__construct()

public function __construct(readonly Availability $availability, readonly Reservations $book, readonly ReservationRepository $reservations, readonly \Symfony\Contracts\Translation\TranslatorInterface $translator, readonly string $layout = 'layout1.html.twig', readonly int $minDelay = 3)

ReservationController::book()

public function book(Request $request): Response

ReservationController::slots()

public function slots(string $jour = '', int $couverts = 2): JsonResponse

The times free that day for that many: the form asks as the guest picks.

ReservationController::manage()

public function manage(Request $request, string $token): Response

ReservationController::ics()

public function ics(string $token): Response

TableController class

class TableController extends AbstractController TableController.php:31

What a table's QR code opens (/t/{token}): the menu in ordering mode on the guests' phones, the table's bill joined (no account), rounds sent to the pass, the waiter called, the bill asked for - and where each round stands. The token is the only key: a poster reprinted with a new token locks the old one out. Each table's phones get so many requests a minute (symfony/rate-limiter, restaurant.table.rate_limit).

TableController::__construct()

public function __construct(readonly TableRepository $tables, readonly DishRepository $dishes, readonly TableOrders $orders, readonly TranslatorInterface $translator, readonly RateLimiterFactory $limiter, readonly string $layout = 'layout1.html.twig', readonly bool $ordering = true, readonly bool $payOnline = false, readonly int $poll = 6, readonly ?\Base\Restaurant\Service\TablePayments $payments = null)

TableController::index()

public function index(string $token): Response

TableController::state()

public function state(string $token, \Base\Restaurant\Service\Revision $revision): JsonResponse

TableController::round()

public function round(Request $request, string $token, Round $round): JsonResponse

TableController::call()

public function call(Request $request, string $token): JsonResponse

TableController::bill()

public function bill(Request $request, string $token): JsonResponse

TablePaymentController class

class TablePaymentController extends AbstractController TablePaymentController.php:30

"Payer depuis mon téléphone" (restaurant.table.pay_online): a table's phone pays its bill - an e-mail address for the receipt, then the shop's payment (Service\TablePayments). Answers where to go: the provider's page, or back to the table's, settled. Loaded only where omnibase/marketplace has its quick order.

TablePaymentController::__construct()

public function __construct(readonly TableRepository $tables, readonly TableOrders $orders, readonly TablePayments $payments, readonly TranslatorInterface $translator, readonly RateLimiterFactory $limiter)

TablePaymentController::pay()

public function pay(Request $request, string $token, BillPayment $bill): JsonResponse

TakeHomeController class

class TakeHomeController extends AbstractController TakeHomeController.php:26

The take-home shop: the fresh dishes to cook at home (/traiteur), a dish and how to cook it (/traiteur/{slug}), and an order followed through its link, without an account (/suivi/{token}). The order itself - without an account either - is TakeHomeOrderController's, where omnibase/marketplace offers its quick order.

const POSTED = 'restaurant/takehome_posted'

Session: the fields of an order that was refused, for the form to show again.

TakeHomeController::__construct()

public function __construct(readonly TakeHomeRepository $dishes, readonly ColdChain $coldChain, readonly string $layout = 'layout1.html.twig', readonly bool $enabled = true, readonly int $maxQuantity = 20, readonly ?TakeHomeOrders $orders = null, readonly ?FormFactoryInterface $forms = null)

TakeHomeController::index()

public function index(Request $request): Response

TakeHomeController::show()

public function show(string $slug): Response

TakeHomeController::track()

public function track(string $token, PickupRepository $pickups, TakeawayTickets $tickets): Response

TakeHomeOrderController class

class TakeHomeOrderController extends AbstractController TakeHomeOrderController.php:26

Ordering at the take-home shop, without an account: the form of /traiteur (Form\TakeHomeOrderType, guarded as glitchr/omnibase guards a form) posts here, the payment follows (omnibase/marketplace's quick order), and the customer ends on the page that follows the order (/suivi/{token}).

Loaded only where the marketplace has its quick order.

TakeHomeOrderController::__construct()

public function __construct(readonly TakeHomeOrders $orders, readonly TranslatorInterface $translator, readonly bool $enabled = true)

TakeHomeOrderController::order()

public function order(Request $request, FormFactoryInterface $forms): Response

Base\Restaurant\Demo

RestaurantDemoAccounts class

final class RestaurantDemoAccounts implements DemoAccountProviderInterface RestaurantDemoAccounts.php:28

The demonstration accounts of a restaurant (glitchr/omnibase's demo environment): one for each of its people. The manager holds restaurant.manager_role - the floor plan, the menu, the services, the book; the floor team and the kitchen hold restaurant.staff_role through two groups, "Salle" and "Cuisine", as in a real restaurant (omnibase stores no ROLE_STAFF on an account) - both run the pass, the kitchen one station at a time (/service?poste=hot); the customer holds no role of the restaurant: the take-home shop, an order paid and followed.

An application's fixtures take them from Base\Demo\DemoAccountFactory ($accounts->account('gerant', $manager)) and attach what makes them worth signing in as: the store and its dishes to the manager, a day's reservations for the pass. A restaurant without one of them leaves it out: base.demo.exclude.

Registered when the installed glitchr/omnibase has the demo environment (config/services.php).

const FLOOR = 'Salle'
const KITCHEN = 'Cuisine'

RestaurantDemoAccounts::__construct()

public function __construct(readonly string $managerRole = 'ROLE_ADMIN', readonly string $staffRole = 'ROLE_STAFF')

RestaurantDemoAccounts::getDemoAccounts()

public function getDemoAccounts(): iterable

Base\Restaurant\DependencyInjection

RestaurantConfiguration class

class RestaurantConfiguration extends AbstractBaseConfiguration RestaurantConfiguration.php:8

RestaurantConfiguration::getConfigTreeBuilder()

public function getConfigTreeBuilder(): TreeBuilder

RestaurantExtension class

class RestaurantExtension extends AbstractBaseExtension RestaurantExtension.php:11

RestaurantExtension::getConfiguration()

public function getConfiguration(array $config, ContainerBuilder $container): RestaurantConfiguration

RestaurantExtension::load()

public function load(array $configs, ContainerBuilder $container): void

Base\Restaurant\Entity

Layout class

class Layout Layout.php:15

A named arrangement of a room - "Midi", "Soir", "Privatisation": where each table stands, which tables are out, which are joined to seat a larger party. A meal service names its layout; a layout may also take over on given dates (a private party). The room's default layout serves when neither says.

Layout::__construct()

public function __construct(string $name = '', ?Room $room = null)

Layout::__toString()

public function __toString(): string

Layout::getId()

public function getId(): ?int

Layout::getRoom()

public function getRoom(): ?Room

Layout::setRoom()

public function setRoom(?Room $room): self

Layout::getName()

public function getName(): string

Layout::setName()

public function setName(string $name): self

Layout::isDefault()

public function isDefault(): bool

Layout::setDefault()

public function setDefault(bool $default): self

Layout::getPositions()

public function getPositions(): array

Layout::setPositions()

public function setPositions(array $positions): self

Layout::place()

public function place(Table $table, int $x, int $y, int $rotation = 0, bool $active = true): self

Layout::positionOf()

public function positionOf(Table $table): array
Returns

where the table stands here (its own place when this layout does not say)

Layout::uses()

public function uses(Table $table): bool

Layout::getJoins()

public function getJoins(): array

Layout::setJoins()

public function setJoins(array $joins): self

Each group: two tables or more, each table in one group only.

Layout::join()

public function join(Table ...$tables): self

Layout::getDates()

public function getDates(): array

Layout::setDates()

public function setDates(array|string|null $dates): self
$dates

"Y-m-d" each, or one per line

Layout::getDatesText()

public function getDatesText(): string

Layout::setDatesText()

public function setDatesText(?string $text): self

Layout::takesOver()

public function takesOver(\DateTimeInterface $day): bool

MealService class

class MealService MealService.php:18

A meal service - lunch, dinner: the days it runs, the first and last time a table may be booked, the step between two times, how long a table is kept by party size, how many covers it takes in all, up to how many a reservation is confirmed without the manager, and the layout of the room.

When the restaurant is open at all is glitchr/omnibase's Base\Service\OpeningHours (the usual week, the days off): a time is only offered when the place is open then.

MealService::__construct()

public function __construct(string $name = '', string $firstSeating = '12:00', string $lastSeating = '13:30')

MealService::__toString()

public function __toString(): string

MealService::getId()

public function getId(): ?int

MealService::getName()

public function getName(): string

MealService::setName()

public function setName(string $name): self

MealService::getWeekdays()

public function getWeekdays(): array

MealService::setWeekdays()

public function setWeekdays(array $weekdays): self

MealService::runsOn()

public function runsOn(\DateTimeInterface $day): bool

MealService::getFirstSeating()

public function getFirstSeating(): string

MealService::setFirstSeating()

public function setFirstSeating(string $time): self

MealService::getLastSeating()

public function getLastSeating(): string

MealService::setLastSeating()

public function setLastSeating(string $time): self

MealService::getStep()

public function getStep(): int

MealService::setStep()

public function setStep(int $step): self

MealService::times()

public function times(): array
Returns

"12:00", "12:15"... the times offered, first to last

MealService::covers()

public function covers(string $time): bool

MealService::getDurations()

public function getDurations(): array

MealService::setDurations()

public function setDurations(array $durations): self

MealService::getDurationsText()

public function getDurationsText(): string

"2: 75" per line, for a form

MealService::setDurationsText()

public function setDurationsText(?string $text): self

MealService::durationFor()

public function durationFor(int $covers): int

Minutes a table is kept for so many covers.

MealService::getMaxCovers()

public function getMaxCovers(): ?int

MealService::setMaxCovers()

public function setMaxCovers(?int $maxCovers): self

MealService::getAutoConfirm()

public function getAutoConfirm(): ?int

MealService::setAutoConfirm()

public function setAutoConfirm(?int $autoConfirm): self

MealService::confirmsAtOnce()

public function confirmsAtOnce(int $covers): bool

MealService::getLayout()

public function getLayout(): ?Layout

MealService::setLayout()

public function setLayout(?Layout $layout): self

MealService::isActive()

public function isActive(): bool

MealService::setActive()

public function setActive(bool $active): self

MealService::getPosition()

public function getPosition(): int

MealService::setPosition()

public function setPosition(int $position): self

MealService::minutes()

public static function minutes(string $time): int

PlatformEvent class

class PlatformEvent PlatformEvent.php:13

A platform's webhook already handled: platforms retry, and the same event (Omnifood\Model\Notification::$id) must make one ticket, not two.

PlatformEvent::__construct()

public function __construct(string $platform, string $eventId, string $event = '')

PlatformEvent::getId()

public function getId(): ?int

PlatformEvent::getPlatform()

public function getPlatform(): string

PlatformEvent::getEventId()

public function getEventId(): string

PlatformEvent::getEvent()

public function getEvent(): string

PlatformEvent::getReceivedAt()

public function getReceivedAt(): \DateTimeImmutable

Reservation class

class Reservation Reservation.php:20

A table booked: when (the restaurant's wall-clock time: stored and read as such, whatever the visitor's time zone), for how many, who, what they asked for, its tables, where it came from - the site, the phone, a walk-in, a platform (its reference there). The guest manages it through its token (/reservation/{token}): see it, move it, cancel it, add it to a calendar.

const SOURCE_SITE = 'site'
const SOURCE_PHONE = 'phone'
const SOURCE_WALK_IN = 'walk_in'

Reservation::__construct()

public function __construct(?\DateTimeImmutable $startsAt = null, int $covers = 2, string $name = '')

Reservation::touch()

public function touch(): void

Reservation::__toString()

public function __toString(): string

Reservation::getId()

public function getId(): ?int

Reservation::getService()

public function getService(): ?MealService

Reservation::setService()

public function setService(?MealService $service): self

Reservation::getStartsAt()

public function getStartsAt(): \DateTimeImmutable

The wall-clock time in the restaurant's zone (the zone PHP happens to hydrate it in is meaningless).

Reservation::getEndsAt()

public function getEndsAt(): \DateTimeImmutable

Reservation::schedule()

public function schedule(\DateTimeImmutable $startsAt, int $minutes): self

When, and for how long (minutes).

Reservation::setStartsAt()

public function setStartsAt(\DateTimeImmutable $startsAt): self

Reservation::getDay()

public function getDay(): string

Reservation::getTime()

public function getTime(): string

Reservation::getMinutes()

public function getMinutes(): int

Reservation::overlaps()

public function overlaps(string $from, string $until): bool

Both wall-clock "Y-m-d H:i", compared as such.

Reservation::getCovers()

public function getCovers(): int

Reservation::setCovers()

public function setCovers(int $covers): self

Reservation::getName()

public function getName(): string

Reservation::setName()

public function setName(?string $name): self

Reservation::getPhone()

public function getPhone(): ?string

Reservation::setPhone()

public function setPhone(?string $phone): self

Reservation::getEmail()

public function getEmail(): ?string

Reservation::setEmail()

public function setEmail(?string $email): self

Reservation::getNotes()

public function getNotes(): ?string

Reservation::setNotes()

public function setNotes(?string $notes): self

Reservation::getAllergies()

public function getAllergies(): ?string

Reservation::setAllergies()

public function setAllergies(?string $allergies): self

Reservation::getStatus()

public function getStatus(): ReservationStatus

Reservation::setStatus()

public function setStatus(ReservationStatus|string $status): self

Forced: the pass and the platforms go through ReservationStatus::canBecome() first.

Reservation::getStatusName()

public function getStatusName(): string

Reservation::setStatusName()

public function setStatusName(?string $status): self

Reservation::holds()

public function holds(): bool

Reservation::getTables()

public function getTables(): Collection

Reservation::assign()

public function assign(iterable $tables): self

Reservation::getTablesLabel()

public function getTablesLabel(): string

Reservation::sits()

public function sits(Table $table): bool

Reservation::getSource()

public function getSource(): string

Reservation::setSource()

public function setSource(string $source): self

Reservation::isFromPlatform()

public function isFromPlatform(): bool

Reservation::getExternalRef()

public function getExternalRef(): ?string

Reservation::setExternalRef()

public function setExternalRef(?string $externalRef): self

Reservation::getToken()

public function getToken(): string

Reservation::getLocale()

public function getLocale(): ?string

Reservation::setLocale()

public function setLocale(?string $locale): self

Reservation::getCreatedAt()

public function getCreatedAt(): \DateTimeImmutable

Reservation::getUpdatedAt()

public function getUpdatedAt(): \DateTimeImmutable

Room class

class Room Room.php:16

A dining room (or a terrace): its size in centimetres, what is drawn in it besides the tables - walls, the counter, the doors, the kitchen pass - and its tables. Its layouts move the tables around and join them for a service or a date (Layout).

const DECOR = ['wall', 'counter', 'door', 'window', 'kitchen', 'plant', 'label']

What the decor may hold, besides the tables.

Room::__construct()

public function __construct(string $name = '', int $width = 1200, int $height = 800)

Room::__toString()

public function __toString(): string

Room::getId()

public function getId(): ?int

Room::getName()

public function getName(): string

Room::setName()

public function setName(string $name): self

Room::getWidth()

public function getWidth(): int

Room::setWidth()

public function setWidth(int $width): self

Room::getHeight()

public function getHeight(): int

Room::setHeight()

public function setHeight(int $height): self

Room::setSize()

public function setSize(int $width, int $height): self

Room::getPosition()

public function getPosition(): int

Room::setPosition()

public function setPosition(int $position): self

Room::getDecor()

public function getDecor(): array

Room::setDecor()

public function setDecor(array $decor): self

Only what the editor knows how to draw is kept, in whole centimetres.

Room::getTables()

public function getTables(): Collection

Room::getActiveTables()

public function getActiveTables(): array

Room::addTable()

public function addTable(Table $table): self

Room::removeTable()

public function removeTable(Table $table): self

Room::getLayouts()

public function getLayouts(): Collection

Room::addLayout()

public function addLayout(Layout $layout): self

Room::removeLayout()

public function removeLayout(Layout $layout): self

Room::getDefaultLayout()

public function getDefaultLayout(): ?Layout

Room::getCapacity()

public function getCapacity(): int

Table class

class Table Table.php:15

A table of a room: its label ("12", "C3"), how many it seats, its shape and its place on the plan (centimetres from the room's top left corner, its centre; degrees). Its token is what its QR code carries (/t/{token}): regenerated, the old posters stop working.

Table::__construct()

public function __construct(string $label = '', int $maxCovers = 2, TableShape $shape = TableShape::SQUARE)

Table::newToken()

public static function newToken(): string

Table::__toString()

public function __toString(): string

Table::getId()

public function getId(): ?int

Table::getRoom()

public function getRoom(): ?Room

Table::setRoom()

public function setRoom(?Room $room): self

Table::getLabel()

public function getLabel(): string

Table::setLabel()

public function setLabel(string $label): self

Table::getMinCovers()

public function getMinCovers(): int

Table::setMinCovers()

public function setMinCovers(int $minCovers): self

Table::getMaxCovers()

public function getMaxCovers(): int

Table::setMaxCovers()

public function setMaxCovers(int $maxCovers): self

Table::setCovers()

public function setCovers(int $min, int $max): self

Table::seats()

public function seats(int $covers): bool

Table::getShape()

public function getShape(): TableShape

Table::setShape()

public function setShape(TableShape|string $shape): self

Table::getShapeName()

public function getShapeName(): string

Table::setShapeName()

public function setShapeName(?string $shape): self

Table::getX()

public function getX(): int

Table::setX()

public function setX(int $x): self

Table::getY()

public function getY(): int

Table::setY()

public function setY(int $y): self

Table::getWidth()

public function getWidth(): int

Table::setWidth()

public function setWidth(int $width): self

Table::getHeight()

public function getHeight(): int

Table::setHeight()

public function setHeight(int $height): self

Table::getRotation()

public function getRotation(): int

Table::setRotation()

public function setRotation(int $rotation): self

Table::place()

public function place(int $x, int $y, ?int $width = null, ?int $height = null, ?int $rotation = null): self

Table::getToken()

public function getToken(): string

Table::regenerateToken()

public function regenerateToken(): self

A new code: the posters printed before stop working.

Table::isActive()

public function isActive(): bool

Table::setActive()

public function setActive(bool $active): self

Table::isOrdering()

public function isOrdering(): bool

Table::setOrdering()

public function setOrdering(bool $ordering): self

Table::isBookable()

public function isBookable(): bool

Table::setBookable()

public function setBookable(bool $bookable): self

Table::getPosition()

public function getPosition(): int

Table::setPosition()

public function setPosition(int $position): self

Base\Restaurant\Entity\Menu

Dish class

class Dish extends Product Dish.php:26

A dish of the menu: an omnibase/marketplace product (its title and text, its price before VAT and the store's VAT, its stock and availability), with what a restaurant's menu says besides - its name in the kitchen's own language, a drawing until there is a photo, the EU allergens (Base\Enum\Allergen), the diets it suits, how hot it is, its section, and the station that makes it (the pass filters by it).

Out of stock (ProductAvailability::OUTOFSTOCK, "rupture" on the pass), it stays on the menu, greyed, cannot be ordered at a table, and is suspended on the delivery platforms.

Dish::__iconizeStatic()

public static function __iconizeStatic(): ?array

Dish::getNativeName()

public function getNativeName(): ?string

Dish::setNativeName()

public function setNativeName(?string $name): self

Dish::getIllustration()

public function getIllustration(): ?string

Dish::setIllustration()

public function setIllustration(?string $illustration): self

Dish::getAllergens()

public function getAllergens(): array

Dish::setAllergens()

public function setAllergens(iterable $allergens): self

Dish::getAllergenCases()

public function getAllergenCases(): array

Dish::contains()

public function contains(Allergen|string $allergen): bool

Dish::getDiets()

public function getDiets(): array

Dish::setDiets()

public function setDiets(iterable $diets): self

Dish::getDietCases()

public function getDietCases(): array

Dish::suits()

public function suits(Diet|string $diet): bool

Dish::getSpice()

public function getSpice(): int

Dish::setSpice()

public function setSpice(?int $spice): self

Dish::getStation()

public function getStation(): Station

Dish::setStation()

public function setStation(Station|string|null $station): self

Dish::getStationName()

public function getStationName(): string

Dish::setStationName()

public function setStationName(?string $station): self

Dish::getSection()

public function getSection(): ?MenuSection

Dish::setSection()

public function setSection(?MenuSection $section): self

Dish::getMenuPosition()

public function getMenuPosition(): int

Dish::setMenuPosition()

public function setMenuPosition(?int $position): self

Dish::isTableOrder()

public function isTableOrder(): bool

Dish::setTableOrder()

public function setTableOrder(?bool $tableOrder): self

Dish::getCourses()

public function getCourses(): array

What a set menu lists; a plain dish has none (asked of any dish by the templates).

@return list<string>

Dish::getPosRef()

public function getPosRef(): string

Its reference for the platforms (Omnifood's Item::$ref) and the tickets.

Dish::isAvailable()

public function isAvailable(): bool

Can be ordered now: on sale and in stock.

Dish::isOutOfStock()

public function isOutOfStock(): bool

Run out for now ("rupture" on the pass): still on the menu, greyed.

Dish::isOnMenu()

public function isOnMenu(): bool

On the menu at all: on sale, or only run out for now.

Dish::runOut()

public function runOut(): self

Dish::restock()

public function restock(): self

Dish::isShippable()

public function isShippable(): bool

Eaten here: nothing is ever posted.

MenuSection class

class MenuSection extends Taxon MenuSection.php:14

A part of the menu - "Entrées", "Ramen", "Boissons": an omnibase taxon (its label, translated, its slug, its icon), in the menu's order, with its name in the kitchen's own language under it.

MenuSection::__iconizeStatic()

public static function __iconizeStatic(): ?array

MenuSection::getMenuPosition()

public function getMenuPosition(): int

MenuSection::setMenuPosition()

public function setMenuPosition(?int $position): self

MenuSection::getNativeName()

public function getNativeName(): ?string

MenuSection::setNativeName()

public function setNativeName(?string $name): self

SetMenu class

class SetMenu extends Dish SetMenu.php:15

A set menu at one price - "Teishoku du midi: le plat du jour, une soupe miso, un dessert": a dish whose courses are listed, served at one meal service only when it says so. Ordered like any dish; the courses are read on the ticket.

SetMenu::__iconizeStatic()

public static function __iconizeStatic(): ?array

SetMenu::getCourses()

public function getCourses(): array

SetMenu::setCourses()

public function setCourses(array|string|null $courses): self
$courses

one per line when a string

SetMenu::getCoursesText()

public function getCoursesText(): string

SetMenu::setCoursesText()

public function setCoursesText(?string $text): self

SetMenu::getOnlyAt()

public function getOnlyAt(): ?MealService

SetMenu::setOnlyAt()

public function setOnlyAt(?MealService $service): self

Base\Restaurant\Entity\Order

Session class

class Session Session.php:22

A table's bill, from the first scan of its code to the till: the rounds (Ticket) its guests send, a call for the waiter, the bill asked for, then settled - at the till by default (cash, card), or from a phone where the site allows it. One open at a time per table; the next guests open a new one.

Session::__construct()

public function __construct(Table $table, ?int $covers = null)

Session::touch()

public function touch(): void

Session::getId()

public function getId(): ?int

Session::getTable()

public function getTable(): Table

Session::moveTo()

public function moveTo(Table $table): self

The guests moved to another table: the bill follows them.

Session::getStatus()

public function getStatus(): SessionStatus

Session::isOpen()

public function isOpen(): bool

Session::getCovers()

public function getCovers(): ?int

Session::setCovers()

public function setCovers(?int $covers): self

Session::getReservation()

public function getReservation(): ?Reservation

Session::setReservation()

public function setReservation(?Reservation $reservation): self

Session::getTickets()

public function getTickets(): Collection

Session::addTicket()

public function addTicket(Ticket $ticket): self

Session::getBilledTickets()

public function getBilledTickets(): array
Returns

the rounds still counted on the bill (not refused nor cancelled)

Session::getTotal()

public function getTotal(): int

Cents, VAT included.

Session::getCurrency()

public function getCurrency(): string

Session::isWaiting()

public function isWaiting(): bool

Some round still on its way from the kitchen.

Session::hasReady()

public function hasReady(): bool

Session::getOpenedAt()

public function getOpenedAt(): \DateTimeImmutable

Session::getWaiterCalledAt()

public function getWaiterCalledAt(): ?\DateTimeImmutable

Session::callWaiter()

public function callWaiter(): self

Session::answerCall()

public function answerCall(): self

Session::getBillRequestedAt()

public function getBillRequestedAt(): ?\DateTimeImmutable

Session::requestBill()

public function requestBill(): self

Session::closeTickets()

public function closeTickets(?\DateTimeImmutable $at = null): array

The bill is being settled: none of its rounds stays on the pass. What was still open - waiting, on the stove, ready - is served: the guests pay for it and leave. Settling never changes what is billed; a round that was not made is cancelled on the pass before the bill is settled.

Returns

those it closed

Session::settle()

public function settle(string $with, ?int $amount = null): self

Paid: its open rounds closed (closeTickets()), the table is free for the next guests.

Session::getOrderReference()

public function getOrderReference(): ?string

Session::setOrderReference()

public function setOrderReference(?string $reference): self

Session::getSettledAt()

public function getSettledAt(): ?\DateTimeImmutable

Session::getSettledWith()

public function getSettledWith(): ?string

Session::getSettledAmount()

public function getSettledAmount(): ?int

Session::getUpdatedAt()

public function getUpdatedAt(): \DateTimeImmutable

Ticket class

class Ticket Ticket.php:24

What the kitchen makes, one ticket at a time, whatever it comes from: a round sent from a table (its Session), an order to take away, a delivery platform's order (Ticket::$platform, its reference there). Independent of omnibase/marketplace's orders and their states: a ticket is the kitchen's paper, it moves along TicketStatus.

Ticket::__construct()

public function __construct(TicketChannel $channel = TicketChannel::TABLE, ?string $platform = null)

Ticket::touch()

public function touch(): void

Ticket::__toString()

public function __toString(): string

Ticket::getLabel()

public function getLabel(): string

"Table 12 · 2", "Uber Eats #A1B2C", "À emporter #7"

Ticket::getId()

public function getId(): ?int

Ticket::getSession()

public function getSession(): ?Session

Ticket::setSession()

public function setSession(?Session $session): self

Ticket::getTable()

public function getTable(): ?Table

Ticket::setTable()

public function setTable(?Table $table): self

Ticket::getChannel()

public function getChannel(): TicketChannel

Ticket::getPlatform()

public function getPlatform(): ?string

Ticket::isFromPlatform()

public function isFromPlatform(): bool

Ticket::getExternalRef()

public function getExternalRef(): ?string

Ticket::setExternalRef()

public function setExternalRef(?string $ref): self

Ticket::getDisplayId()

public function getDisplayId(): ?string

Ticket::setDisplayId()

public function setDisplayId(?string $displayId): self

Ticket::getStatus()

public function getStatus(): TicketStatus

Ticket::getRound()

public function getRound(): int

Ticket::setRound()

public function setRound(int $round): self

Ticket::getCustomerName()

public function getCustomerName(): ?string

Ticket::setCustomerName()

public function setCustomerName(?string $name): self

Ticket::getNote()

public function getNote(): ?string

Ticket::setNote()

public function setNote(?string $note): self

Ticket::getCurrency()

public function getCurrency(): string

Ticket::setCurrency()

public function setCurrency(string $currency): self

Ticket::moveTo()

public function moveTo(TicketStatus $to, ?\DateTimeImmutable $at = null): self

Moves it along; a step TicketStatus does not allow is refused - two people on the pass tapping the same ticket do not serve it twice.

Throws

TransitionException

Ticket::advance()

public function advance(): self

The one step forward.

@throws TransitionException at the end

Ticket::close()

public function close(TicketStatus $status, ?\DateTimeImmutable $at = null): self

Closed with its table's bill, wherever it stood (Session::closeTickets()): served, its times filled in for the steps it skipped. Not a step of the pass: moveTo() would refuse it.

Ticket::force()

public function force(TicketStatus $status): self

As the platform says it now is, without asking whether the pass would have gone that way.

Ticket::getLines()

public function getLines(): Collection

Ticket::getLinesFor()

public function getLinesFor(?Station $station): array

Ticket::addLine()

public function addLine(TicketLine $line): self

Ticket::getStations()

public function getStations(): array
Returns

the stations it needs, in their order

Ticket::count()

public function count(): int

Ticket::getTotal()

public function getTotal(): int

Cents, VAT included: what the platform says was paid, else the lines.

Ticket::getPaid()

public function getPaid(): ?int

Ticket::setPaid()

public function setPaid(?int $paid): self

Ticket::getCreatedAt()

public function getCreatedAt(): \DateTimeImmutable

Ticket::setCreatedAt()

public function setCreatedAt(\DateTimeInterface $at): self

Ticket::getAcceptBy()

public function getAcceptBy(): ?\DateTimeImmutable

Ticket::setAcceptBy()

public function setAcceptBy(?\DateTimeInterface $at): self

Ticket::getPickupAt()

public function getPickupAt(): ?\DateTimeImmutable

Ticket::setPickupAt()

public function setPickupAt(?\DateTimeInterface $at): self

Ticket::getAcceptedAt()

public function getAcceptedAt(): ?\DateTimeImmutable

Ticket::getReadyAt()

public function getReadyAt(): ?\DateTimeImmutable

Ticket::getServedAt()

public function getServedAt(): ?\DateTimeImmutable

Ticket::getUpdatedAt()

public function getUpdatedAt(): \DateTimeImmutable

Ticket::secondsToAccept()

public function secondsToAccept(?\DateTimeImmutable $now = null): ?int

Seconds left to accept a platform's order; null when nothing is awaited.

TicketLine class

class TicketLine TicketLine.php:14

One line of a ticket: so many of a dish, its options ("bien cuit", "sans oignons", "+ œuf"), a note, and the station that makes it. Its name and price are copied when it is sent: the menu may change, the ticket does not.

TicketLine::__construct()

public function __construct(string $name, int $quantity = 1, int $unitPrice = 0, Station $station = Station::HOT)

TicketLine::of()

public static function of(Dish $dish, int $quantity, int $unitPrice): self

TicketLine::getId()

public function getId(): ?int

TicketLine::getTicket()

public function getTicket(): ?Ticket

TicketLine::setTicket()

public function setTicket(?Ticket $ticket): self

TicketLine::getDish()

public function getDish(): ?Dish

TicketLine::getName()

public function getName(): string

TicketLine::getQuantity()

public function getQuantity(): int

TicketLine::getUnitPrice()

public function getUnitPrice(): int

TicketLine::getTotal()

public function getTotal(): int

TicketLine::getOptions()

public function getOptions(): array

TicketLine::setOptions()

public function setOptions(array $options): self

TicketLine::getNote()

public function getNote(): ?string

TicketLine::setNote()

public function setNote(?string $note): self

TicketLine::getStation()

public function getStation(): Station

TicketLine::setStation()

public function setStation(Station $station): self

Base\Restaurant\Entity\Product

TakeHome class

class TakeHome extends Product TakeHome.php:22

A dish to cook at home, sold by the restaurant's take-home shop - fresh, frozen, or kept on a shelf: an omnibase/marketplace product (title and text, price before VAT and its VAT - 5.5 % in France for food to take away that is not eaten at once -, stock, availability) with what such a dish says besides: how it is kept (Enum\Keeping) and at what temperature, how many days it keeps once made (its use-by date), its weight and portions, how to cook it, its allergens, and whether it may travel in a chilled parcel (Service\ColdChain).

TakeHome::__iconizeStatic()

public static function __iconizeStatic(): ?array

TakeHome::getNativeName()

public function getNativeName(): ?string

TakeHome::setNativeName()

public function setNativeName(?string $name): self

TakeHome::getIllustration()

public function getIllustration(): ?string

TakeHome::setIllustration()

public function setIllustration(?string $illustration): self

TakeHome::getAllergens()

public function getAllergens(): array

TakeHome::setAllergens()

public function setAllergens(iterable $allergens): self

TakeHome::getAllergenCases()

public function getAllergenCases(): array

TakeHome::getKeeping()

public function getKeeping(): Keeping

TakeHome::setKeeping()

public function setKeeping(Keeping|string|null $keeping): self

TakeHome::getKeepingName()

public function getKeepingName(): string

TakeHome::setKeepingName()

public function setKeepingName(?string $keeping): self

TakeHome::isFrozen()

public function isFrozen(): bool

TakeHome::isChilled()

public function isChilled(): bool

Kept cold - fresh or frozen: it leaves in an insulated bag, travels in a chilled parcel only.

TakeHome::getStorageTemperature()

public function getStorageTemperature(): int

TakeHome::setStorageTemperature()

public function setStorageTemperature(?int $celsius): self

TakeHome::getShelfLife()

public function getShelfLife(): int

TakeHome::setShelfLife()

public function setShelfLife(?int $days): self

TakeHome::getNetWeight()

public function getNetWeight(): ?int

TakeHome::setNetWeight()

public function setNetWeight(?int $grams): self

TakeHome::getPortions()

public function getPortions(): int

TakeHome::setPortions()

public function setPortions(?int $portions): self

TakeHome::getCookingTime()

public function getCookingTime(): ?int

TakeHome::setCookingTime()

public function setCookingTime(?int $minutes): self

TakeHome::getCookingSteps()

public function getCookingSteps(?string $locale = null): array
Returns

the steps in this language, else in the first one written

TakeHome::setCookingSteps()

public function setCookingSteps(?array $steps): self
$steps

by language, or a plain list

TakeHome::getCookingText()

public function getCookingText(): string

The back office's field: the steps of the first language, one per line.

TakeHome::setCookingText()

public function setCookingText(?string $text): self

TakeHome::isParcel()

public function isParcel(): bool

TakeHome::getParcel()

public function getParcel(): bool

TakeHome::setParcel()

public function setParcel(?bool $parcel): self

TakeHome::getShopPosition()

public function getShopPosition(): int

TakeHome::setShopPosition()

public function setShopPosition(?int $position): self

TakeHome::useBy()

public function useBy(\DateTimeImmutable $madeOn): \DateTimeImmutable

Its use-by date, made on this day.

TakeHome::getWeight()

public function getWeight(): ?int

Grams, for the parcel: its net weight (the marketplace's attribute otherwise).

TakeHome::isAvailable()

public function isAvailable(): bool

Base\Restaurant\Enum

Diet enum

enum Diet Diet.php:6

What a dish suits, shown as pills and filtered on the menu (the allergens are glitchr/omnibase's Base\Enum\Allergen).

case VEGETARIAN = 'vegetarian'
case VEGAN = 'vegan'
case NO_PORK = 'no_pork'
case GLUTEN_FREE = 'gluten_free'

Diet::choices()

public static function choices(): array
Returns

label key => value, for a ChoiceType

Diet::fromList()

public static function fromList(iterable $values): array
$values

@return list<self>

Diet::trans()

public function trans(): string

Keeping enum

enum Keeping Keeping.php:11

How a take-home dish is kept until it is cooked: on a shelf, in the fridge, or in the freezer. It says the temperature it is kept at by default and how it leaves the restaurant (a chilled or frozen dish goes in an insulated bag, and travels only in a chilled parcel).

case AMBIENT = 'ambient'
case FRESH = 'fresh'
case FROZEN = 'frozen'

Keeping::temperature()

public function temperature(): int

The highest temperature it is kept at, in °C, when the dish says nothing else

Keeping::isCold()

public function isCold(): bool

Kept cold: it leaves in an insulated bag, travels in a chilled parcel only

Keeping::trans()

public function trans(): string

ReservationStatus enum

enum ReservationStatus ReservationStatus.php:11

Where a reservation stands. Asked for (above the service's automatic confirmation, or from a platform that waits for an answer), confirmed, then the evening: seated, finished - or absent; cancelled by the guest or the restaurant, refused. The first three hold their tables.

case REQUESTED = 'requested'
case CONFIRMED = 'confirmed'
case SEATED = 'seated'
case FINISHED = 'finished'
case NO_SHOW = 'no_show'
case CANCELLED = 'cancelled'
case REFUSED = 'refused'

ReservationStatus::holds()

public function holds(): bool

It holds its tables (and counts against the service's covers).

ReservationStatus::isFinal()

public function isFinal(): bool

ReservationStatus::next()

public function next(): array

What the pass may make of it.

@return list<self>

ReservationStatus::canBecome()

public function canBecome(self $to): bool

ReservationStatus::trans()

public function trans(): string

SessionStatus enum

enum SessionStatus SessionStatus.php:6

A table's bill: open while the guests order, asked for, settled (at the till, or from a phone).

case OPEN = 'open'
case BILL = 'bill'
case SETTLED = 'settled'

SessionStatus::isOpen()

public function isOpen(): bool

SessionStatus::trans()

public function trans(): string

Station enum

enum Station Station.php:6

Where a dish is made: the hot kitchen, the cold side (sushi, salads, desserts), the bar. The pass filters by it.

case HOT = 'hot'
case COLD = 'cold'
case BAR = 'bar'

Station::trans()

public function trans(): string

TableShape enum

enum TableShape TableShape.php:6

How a table is drawn on the floor plan. A counter is a row of stools: one seat per 60 cm.

case ROUND = 'round'
case SQUARE = 'square'
case RECTANGLE = 'rectangle'
case COUNTER = 'counter'

TableShape::trans()

public function trans(): string

TicketChannel enum

enum TicketChannel TicketChannel.php:6

Where a ticket comes from: a table's phones, the counter (to take away), a delivery platform (Ticket::$platform names which).

case TABLE = 'table'
case TAKEAWAY = 'takeaway'
case PLATFORM = 'platform'

TicketChannel::trans()

public function trans(): string

TicketStatus enum

enum TicketStatus TicketStatus.php:15

A ticket's way through the kitchen, whatever its channel:

new ─▶ accepted ─▶ preparing ─▶ ready ─▶ served │ └──────────┴──────────┴─▶ cancelled └─▶ refused | cancelled

A round sent from a table is accepted at once (the guests are seated); a platform's order waits for the pass's answer, within the platform's delay.

case NEW = 'new'
case ACCEPTED = 'accepted'
case PREPARING = 'preparing'
case READY = 'ready'
case SERVED = 'served'

Brought to the table, handed to the courier or the customer

case REFUSED = 'refused'
case CANCELLED = 'cancelled'

TicketStatus::next()

public function next(): array

TicketStatus::canBecome()

public function canBecome(self $to): bool

TicketStatus::forward()

public function forward(): ?self

The one step forward the pass's main button takes; null at the end.

TicketStatus::isFinal()

public function isFinal(): bool

TicketStatus::isOpen()

public function isOpen(): bool

Still on the pass: not served, refused nor cancelled.

TicketStatus::column()

public function column(): ?string

The pass's column.

TicketStatus::trans()

public function trans(): string

Base\Restaurant\Event

DishAvailabilityEvent class

final class DishAvailabilityEvent DishAvailabilityEvent.php:8

A dish run out on the pass, or back: the Omnifood bridge suspends it on the platforms, or brings it back.

public readonly Dish $dish
public readonly bool $available

DishAvailabilityEvent::__construct()

public function __construct(public readonly Dish $dish, public readonly bool $available)

ReservationChangedEvent class

final class ReservationChangedEvent ReservationChangedEvent.php:13

A reservation taken, moved or moved along (confirmed, seated, cancelled...).

$previous is its status before; null for a new one. The Omnifood bridge tells the platform it came from.

public readonly Reservation $reservation
public readonly ?ReservationStatus $previous
public readonly bool $fromPlatform

Told by the platform itself: nothing to send back

ReservationChangedEvent::__construct()

public function __construct(public readonly Reservation $reservation, public readonly ?ReservationStatus $previous = null, public readonly bool $fromPlatform = false)

TicketMovedEvent class

final class TicketMovedEvent TicketMovedEvent.php:12

A ticket arrived (from null) or moved along on the pass. The Omnifood bridge tells the platform of a platform's order (accepted, denied, ready).

public readonly Ticket $ticket
public readonly ?TicketStatus $from
public readonly ?string $reason

Why a refusal or a cancellation: an Omnifood DenyReason value

public readonly bool $fromPlatform

TicketMovedEvent::__construct()

public function __construct(public readonly Ticket $ticket, public readonly ?TicketStatus $from = null, public readonly ?string $reason = null, public readonly bool $fromPlatform = false)

Base\Restaurant\EventListener

QuickOrderListener class

final class QuickOrderListener QuickOrderListener.php:20

What omnibase/marketplace's quick orders are to the restaurant: an order paid settles the table's bill it pays (when the payment came back from a provider: a card), and the page a quick order ends on is the restaurant's own - the table's page for a bill, the page that follows a take-home order.

QuickOrderListener::__construct()

public function __construct(readonly TablePayments $payments, readonly SessionRepository $sessions, readonly Pickups $pickups, readonly UrlGeneratorInterface $router)

QuickOrderListener::onPaid()

public function onPaid(OrderPaidEvent $event): void

QuickOrderListener::onDone()

public function onDone(QuickOrderDoneEvent $event): void

RevisionListener class

final class RevisionListener RevisionListener.php:12

Anything of the restaurant written: the revision the pass watches grows.

RevisionListener::__construct()

public function __construct(readonly Revision $revision)

RevisionListener::onFlush()

public function onFlush(OnFlushEventArgs $args): void

RevisionListener::postFlush()

public function postFlush(PostFlushEventArgs $args): void

TakeawayListener class

final class TakeawayListener TakeawayListener.php:16

The shop's orders and the pass, both ways: a hand-over received (its order is paid) puts a ticket on the pass; the ticket moved there moves the hand-over its customer follows.

TakeawayListener::__construct()

public function __construct(readonly TakeawayTickets $tickets)

TakeawayListener::onPickup()

public function onPickup(PickupChangedEvent $event): void

TakeawayListener::onTicket()

public function onTicket(TicketMovedEvent $event): void

Base\Restaurant\Exception

RestaurantException class

class RestaurantException extends RuntimeException RestaurantException.php:6

Something the guest or the staff should read: the message is a key of the "restaurant" translations, with its parameters.

public readonly array $parameters

RestaurantException::__construct()

public function __construct(string $message = '', public readonly array $parameters = [], ?\Throwable $previous = null)

TransitionException class

class TransitionException extends RestaurantException TransitionException.php:6

A ticket or a reservation asked to go where its status does not lead.

UnavailableException class

class UnavailableException extends RestaurantException UnavailableException.php:6

No table for that many at that time any more: someone booked it meanwhile, or the time is not offered. The message is a key of the "restaurant" translations.

Base\Restaurant\Form

BookingType class

class BookingType extends AbstractType BookingType.php:26

The public reservation form, on a model (Model\Booking): the day, how many, the time among those offered (the page fills them as the day and the size change), who, what they ask, and glitchr/omnibase's data-protection notice. Guarded as glitchr/omnibase guards a form (its option guard, action "book"): a trap, the time it takes, the lists, the captcha when the site has glitchr/omnishield.

BookingType::buildForm()

public function buildForm(FormBuilderInterface $builder, array $options): void

BookingType::configureOptions()

public function configureOptions(OptionsResolver $resolver): void

BookingType::getBlockPrefix()

public function getBlockPrefix(): string

TakeHomeOrderType class

class TakeHomeOrderType extends AbstractType TakeHomeOrderType.php:27

An order of the take-home shop (/traiteur/commander), as its page's form posts it: the dishes and how many (lines[<dish id>]), how it leaves and when, who. A root form without a name (createNamed('')): its fields keep the page's names - email, lines[12], day. Guarded as glitchr/omnibase guards a public form (its option guard, action "takehome": a trap, the time it takes, the lists, the captcha when the site has glitchr/omnishield), in place of the page's own trap. Its fields are validated as Model\TakeHomeOrder's constraints say.

The page writes the fields by hand (it works without JavaScript, the dishes being cards); it prints the guard's own from the form's view.

TakeHomeOrderType::buildForm()

public function buildForm(FormBuilderInterface $builder, array $options): void

TakeHomeOrderType::configureOptions()

public function configureOptions(OptionsResolver $resolver): void

TakeHomeOrderType::getBlockPrefix()

public function getBlockPrefix(): string

Base\Restaurant\Model

BillPayment class

final class BillPayment BillPayment.php:8

What a phone sends to pay its table's bill (#[MapRequestPayload]): where the receipt goes.

public string $email = ''

Booking class

class Booking Booking.php:12

What the public reservation form holds (omnibase's FormFactory takes a model, not an entity): the day, the time, how many, who, what they ask.

The robots are the form's guard's (glitchr/omnibase's option guard).

public ?string $day = null
public ?string $time = null
public ?int $covers = 2
public ?string $name = null
public ?string $email = null
public ?string $phone = null
public ?string $notes = null
public ?string $allergies = null

Floor class

final readonly class Floor Floor.php:11

The tables in use for a service on a day, and those pushed together - as the layouts of the rooms say (Service\FloorPlan).

public array $tables
public array $joins

groups of table ids, each among $tables

Floor::__construct()

public function __construct(public array $tables, public array $joins = [])
$joins

groups of table ids, each among $tables

Floor::table()

public function table(int $id): ?Table

Floor::capacity()

public function capacity(): int

HandOver class

final class HandOver HandOver.php:12

One way a take-home order may leave (Service\ColdChain::options()): whether this basket can go that way, why not when it cannot (a key of the "restaurant" translations), and the days it may be for.

public readonly PickupMode $mode
public readonly bool $available
public readonly array $days
public readonly ?string $reason
public readonly array $parameters

the reason's

HandOver::__construct()

public function __construct(public readonly PickupMode $mode, public readonly bool $available, public readonly array $days = [], public readonly ?string $reason = null, public readonly array $parameters = [])
$parameters

the reason's

Round class

final class Round Round.php:8

A round sent from a table's phone (#[MapRequestPayload]): its lines, and a word for the kitchen.

public array $lines = []
public ?string $note = null
public ?int $covers = null

RoundLine class

final class RoundLine RoundLine.php:8

One line of a round sent from a table's phone.

public int $dish = 0
public int $quantity = 1
public array $options = []

The dish's options chosen (omnibase/marketplace's Product\Option), by id; a text is kept as a word for the kitchen ("sans oignons").

public ?string $note = null

RoundLine::optionIds()

public function optionIds(): array
Returns

the option ids

RoundLine::optionWords()

public function optionWords(): array
Returns

the words that are not option ids

Slot class

final readonly class Slot Slot.php:9

A time a party can be seated at, in which service, at which tables, for how long.

public string $day
public string $time
public MealService $service
public array $tables
public int $minutes

Slot::__construct()

public function __construct(public string $day, public string $time, public MealService $service, public array $tables, public int $minutes)

Slot::startsAt()

public function startsAt(): \DateTimeImmutable

Slot::tablesLabel()

public function tablesLabel(): string

TakeHomeOrder class

final class TakeHomeOrder TakeHomeOrder.php:12

An order of the take-home shop as its form posts it (Form\TakeHomeOrderType): the dishes and how many, who, and how it leaves - collected on a slot, brought to a postcode nearby, or sent in a chilled parcel.

public array $lines = []
public string $email = ''
public string $name = ''
public string $phone = ''
public string $mode = 'pickup'
public string $day = ''

The day it is for: collected, brought, or handed to the carrier.

public ?string $slot = null
public ?string $address = null
public ?string $postcode = null
public ?string $city = null
public ?string $note = null

TakeHomeOrder::quantities()

public function quantities(): array
Returns

dish id => quantity, those taken

Base\Restaurant\Omnifood

FoodKeysSection class

final class FoodKeysSection implements SettingsSectionInterface FoodKeysSection.php:14

The platforms' keys on omnibase/admin's API keys page, one group per platform the site configures (omnifood.platforms): typed there (api.food.<platform>.<option>), they win over the configuration - Platforms builds each platform with them.

FoodKeysSection::__construct()

public function __construct(readonly Platforms $platforms)

FoodKeysSection::getPage()

public function getPage(): string

FoodKeysSection::getFields()

public function getFields(): array

MenuExport class

class MenuExport MenuExport.php:21

The restaurant's menu in Omnifood's shape, for the delivery platforms: a category per section, an item per dish (its reference is the dish's slug - the one the orders carry back -, its price VAT included, its VAT rate, its EU allergens, its diets as labels), what is run out unavailable.

Only the dishes that travel: those orderable away from the table.

MenuExport::__construct()

public function __construct(readonly DishRepository $dishes, readonly Pricing $pricing)

MenuExport::menu()

public function menu(string $name = 'Menu', string $currency = 'EUR', ?string $photoBase = null): Menu

MenuExport::item()

public function item(Dish $dish, ?string $photoBase = null): Item

OrderTickets class

final class OrderTickets OrderTickets.php:23

A platform's order (Omnifood\Model\Order) made a ticket: its reference and short number, who ordered, the note, what was paid, when it was placed and is collected, until when it may be accepted (the platform's delay), and its lines - each tied to the menu's dish when the platform carries the restaurant's reference back (the dish's station then), its modifiers as the line's options. Nothing is read nor saved here.

OrderTickets::make()

public static function make(string $platform, Order $order, ?int $acceptanceDelay = null, ?callable $dishFor = null): Ticket
$acceptanceDelay

seconds the platform waits for an answer (Capabilities::$acceptanceDelay)

$dishFor

the menu's dish for a POS reference

OrderTickets::status()

public static function status(OrderStatus $status): ?TicketStatus

OrderTickets::options()

public static function options(array $modifiers, string $prefix = ''): array
Returns

"2 × Œuf", nested choices indented under theirs

PlatformHealth class

class PlatformHealth PlatformHealth.php:15

How each platform's connection stands, for the pass: configured (every key its factory needs is set - in the configuration or typed in the back office), not configured (a key missing: nothing is called, the webhook answers 404), or in error (the last call or webhook failed - what the platform said, and when - until one succeeds). The failures are kept in the cache: a screen's indication, not a record.

const CONFIGURED = 'configured'
const UNCONFIGURED = 'unconfigured'
const ERROR = 'error'
const FORGET = 86400

A failure is forgotten after this many seconds, if nothing succeeds before

PlatformHealth::__construct()

public function __construct(readonly Platforms $platforms, readonly ?CacheItemPoolInterface $cache = null)

PlatformHealth::all()

public function all(): array

Every platform the site declares, with its state.

PlatformHealth::of()

public function of(string $name): array

PlatformHealth::failed()

public function failed(string $name, string $message): void

PlatformHealth::succeeded()

public function succeeded(string $name): void

PlatformSubscriber class

final class PlatformSubscriber PlatformSubscriber.php:23

What the pass does, told to the platforms: a platform's order accepted, denied, ready or cancelled; a dish run out (or back) on every platform whose menu it is on; a platform's reservation seated, finished, absent or cancelled. A platform that fails is logged and marked in error on the pass (PlatformHealth) until a call succeeds: the pass goes on (the restaurant's tablet from the platform is the fallback).

const PREPARATION = 15

Minutes a platform is told the kitchen needs, when it takes a time

PlatformSubscriber::__construct()

public function __construct(readonly Platforms $platforms, readonly ?LoggerInterface $logger = null, readonly ?PlatformHealth $health = null)

PlatformSubscriber::onTicket()

public function onTicket(TicketMovedEvent $event): void

PlatformSubscriber::onDish()

public function onDish(DishAvailabilityEvent $event): void

PlatformSubscriber::onReservation()

public function onReservation(ReservationChangedEvent $event): void

Platforms class

class Platforms Platforms.php:20

The restaurant's platforms (glitchr/omnifood's Registry), each built with the keys typed in the back office over the configured ones - settings api.food.<platform>.<option> (Settings\FoodKeysSection declares the fields), as omnibase/marketplace does for its payment gateways.

const SETTINGS = 'api.food'
const KEYS = ['ubereats' => ['client_id', 'client_secret', 'store_id'], 'deliveroo' => ['client_id', 'client_secret', 'brand_id', 'site_id', 'webhook_secret'], 'justeat' …

The options a back office types, by platform factory: the rest stays in the configuration.

Platforms::__construct()

public function __construct(readonly Registry $registry, readonly ?SettingBagInterface $settings = null)

Platforms::names()

public function names(): array

Platforms::has()

public function has(string $name): bool

Platforms::get()

public function get(string $name): PlatformInterface

Platforms::factoryOf()

public function factoryOf(string $name): ?string

The platform's factory name (its config: "ubereats", "thefork"...).

Platforms::having()

public function having(string $capability): array
Returns

name => platform, those that do it

Platforms::orders()

public function orders(string $name): ?OrdersInterface

Platforms::reservations()

public function reservations(string $name): ?ReservationsInterface

Platforms::notifiable()

public function notifiable(string $name): ?NotifiableInterface

Platforms::store()

public function store(string $name): ?StoreInterface

Platforms::menu()

public function menu(string $name): ?MenuInterface

Platforms::missing()

public function missing(string $name): array

The keys this platform still lacks - of those its factory needs (KEYS), neither configured nor typed. Empty: the platform may be built and called. A factory not listed is taken as configured.

Platforms::isConfigured()

public function isConfigured(string $name): bool

Platforms::typed()

public function typed(string $name): array

The options typed for this platform, the empty ones left out.

Receiver class

class Receiver Receiver.php:35

A platform's webhook, made into the restaurant's own: an order becomes a ticket on the pass (channel "platform", its reference there), a cancellation cancels it; a reservation joins the book (source: the platform), at the tables that fit. Each event once: the platforms retry, Notification::$id is kept (PlatformEvent).

Receiver::__construct()

public function __construct(readonly Platforms $platforms, readonly EntityManagerInterface $entityManager, readonly ManagerRegistry $doctrine, readonly TicketRepository $tickets, readonly ReservationRepository $reservations, readonly DishRepository $dishes, readonly Availability $availability, readonly EventDispatcherInterface $dispatcher)

Receiver::receive()

public function receive(string $name, string $body, array $headers): Ticket|Reservation|null

Checks the call (Omnifood\Exception\InvalidSignatureException when it does not hold) and handles it. Null: nothing to do (an event already seen, a subject the restaurant does not keep).

Receiver::ticket()

public function ticket(string $name, Order $order): Ticket

An order as the platform has it now: a new ticket, or the one it already is, brought up to date.

Receiver::booking()

public function booking(string $name, Booking $booking): Reservation

A reservation as the platform has it now: in the book, at the tables that fit (or none, for the staff to place).

Base\Restaurant\Omnifood\Command

MenuPushCommand class

final class MenuPushCommand extends Command MenuPushCommand.php:18

The menu sent to the delivery platforms (each replaces its own): all of them, or the one named.

MenuPushCommand::__construct()

public function __construct(readonly Platforms $platforms, readonly MenuExport $export)

ReservationsSyncCommand class

final class ReservationsSyncCommand extends Command ReservationsSyncCommand.php:19

The booking platforms' reservations read and put in the book - what their webhooks missed. Run by the cron container every few minutes.

ReservationsSyncCommand::__construct()

public function __construct(readonly Platforms $platforms, readonly Receiver $receiver)

Base\Restaurant\Repository

DishRepository class

class DishRepository extends ServiceEntityRepository DishRepository.php:11

DishRepository::__construct()

public function __construct(ManagerRegistry $registry)

DishRepository::menu()

public function menu(): array
Returns

every dish (set menus included) in the menu's order

DishRepository::bySection()

public function bySection(bool $onSaleOnly = true): array
Returns

the menu by section, sections in their order, the dishes without one last

LayoutRepository class

class LayoutRepository extends ServiceEntityRepository LayoutRepository.php:10

LayoutRepository::__construct()

public function __construct(ManagerRegistry $registry)

LayoutRepository::ordered()

public function ordered(): array

MealServiceRepository class

class MealServiceRepository extends ServiceEntityRepository MealServiceRepository.php:10

MealServiceRepository::__construct()

public function __construct(ManagerRegistry $registry)

MealServiceRepository::ordered()

public function ordered(): array

MealServiceRepository::runningOn()

public function runningOn(\DateTimeInterface $day): array
Returns

the services running that day, in their order

MealServiceRepository::at()

public function at(\DateTimeInterface $day, string $time): ?MealService

The service a time of that day falls in.

ReservationRepository class

class ReservationRepository extends ServiceEntityRepository ReservationRepository.php:17

Reservations are kept in the restaurant's wall-clock time: days and hours are compared as written ("2026-10-04 20:00"), never through a time zone.

ReservationRepository::__construct()

public function __construct(ManagerRegistry $registry)

ReservationRepository::findOneByToken()

public function findOneByToken(string $token): ?Reservation

ReservationRepository::findOneByExternal()

public function findOneByExternal(string $source, string $ref): ?Reservation

ReservationRepository::onDay()

public function onDay(\DateTimeInterface $day): array
Returns

that day's, by time, whatever their status

ReservationRepository::holdingOn()

public function holdingOn(\DateTimeInterface $day): array
Returns

that day's still holding their tables (asked, confirmed, seated)

ReservationRepository::toConfirm()

public function toConfirm(\DateTimeInterface $today): array
Returns

asked for and not answered yet, from today on

ReservationRepository::coversOn()

public function coversOn(\DateTimeInterface $day): int

ReservationRepository::revision()

public function revision(): int

Microseconds of the last change, for the pass's polling.

ReservationRepository::bounds()

public static function bounds(\DateTimeInterface $day): array
Returns

the day's wall-clock bounds

RoomRepository class

class RoomRepository extends ServiceEntityRepository RoomRepository.php:10

RoomRepository::__construct()

public function __construct(ManagerRegistry $registry)

RoomRepository::ordered()

public function ordered(): array

SessionRepository class

class SessionRepository extends ServiceEntityRepository SessionRepository.php:12

SessionRepository::__construct()

public function __construct(ManagerRegistry $registry)

SessionRepository::openAt()

public function openAt(Table $table): ?Session

SessionRepository::openByTable()

public function openByTable(): array
Returns

table id => its open session

SessionRepository::revision()

public function revision(): int

SessionRepository::settledSince()

public function settledSince(\DateTimeImmutable $since): array
Returns

settled since then, newest first

TableRepository class

class TableRepository extends ServiceEntityRepository TableRepository.php:10

TableRepository::__construct()

public function __construct(ManagerRegistry $registry)

TableRepository::ordered()

public function ordered(): array

TableRepository::findOneByToken()

public function findOneByToken(string $token): ?Table

TableRepository::active()

public function active(): array
Returns

every table in use, room by room

TakeHomeRepository class

class TakeHomeRepository extends ServiceEntityRepository TakeHomeRepository.php:10

TakeHomeRepository::__construct()

public function __construct(ManagerRegistry $registry)

TakeHomeRepository::shop()

public function shop(bool $onSaleOnly = true): array
Returns

the shop's dishes in its order; those withdrawn from sale left out

TakeHomeRepository::findOneBySlug()

public function findOneBySlug(string $slug): ?TakeHome

TicketRepository class

class TicketRepository extends ServiceEntityRepository TicketRepository.php:11

TicketRepository::__construct()

public function __construct(ManagerRegistry $registry)

TicketRepository::findOneByExternal()

public function findOneByExternal(string $platform, string $ref): ?Ticket

TicketRepository::onThePass()

public function onThePass(int $servedFor = 20): array
Returns

what the pass shows: every ticket not finished, and those served in the last $servedFor minutes

TicketRepository::latestNew()

public function latestNew(): int

The newest ticket waiting for an answer: the pass rings when it grows.

TicketRepository::countOpen()

public function countOpen(): int

TicketRepository::revision()

public function revision(): int

Base\Restaurant\Reviews

RestaurantReviews class

class RestaurantReviews RestaurantReviews.php:23

The restaurant on the review platforms (glitchr/omnireview): where it is on each (restaurant.reviews.places), its latest reviews, those it has not answered. Everything is asked through the family's Twig functions (OmnireviewExtension): kept no longer than each platform allows, nothing when a platform does not answer. A platform whose gateway is not configured - no key - is left out: nothing shows.

Registered only when glitchr/omnireview is installed; it implements none of its interfaces.

RestaurantReviews::__construct()

public function __construct(readonly ?Registry $registry = null, readonly ?OmnireviewExtension $omnireview = null, readonly array $places = [], readonly array $owners = [], readonly int $limit = 3)
$places

gateway => the restaurant's ID there

$owners

gateway => the owner's location (Google Business Profile)

RestaurantReviews::places()

public function places(): array
Returns

the platforms the restaurant shows, their gateway configured

RestaurantReviews::limit()

public function limit(): int

RestaurantReviews::widget()

public function widget(Environment $twig, string $gateway, Place $place, ?int $limit = null): string

The family's widget for one platform: its rating and latest reviews, their origin, date and link.

RestaurantReviews::latest()

public function latest(int $limit = 5): array

The latest reviews over every platform, newest first.

RestaurantReviews::unanswered()

public function unanswered(int $limit = 20): array

The reviews not answered yet, where the platform says whether one was: the owner's side (Google Business Profile, Trustpilot's business user).

Base\Restaurant\Service

Availability class

class Availability Availability.php:24

The reservation book's free times and its taking: Seating reckons, this reads the day (its services, its layouts, the reservations holding tables) and writes the reservation under a lock on the day - two guests taking the last table at the same second get it once (symfony/lock).

Availability::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly Seating $seating, readonly FloorPlan $plans, readonly MealServiceRepository $services, readonly ReservationRepository $reservations, readonly OpeningHours $hours, readonly LockFactory $locks, readonly int $notice = 60, readonly int $horizon = 60, readonly int $maxCovers = 8)

Availability::maxCovers()

public function maxCovers(): int

Availability::today()

public function today(): \DateTimeImmutable

The restaurant's today, in its own time zone.

Availability::now()

public function now(): \DateTimeImmutable

The restaurant's wall-clock now.

Availability::lastDay()

public function lastDay(): \DateTimeImmutable

Availability::slots()

public function slots(\DateTimeInterface $day, int $covers, bool $online = true, ?Reservation $except = null): array

Every time a party can come on that day, service by service.

Online ($online): the notice, the horizon, the size limit and each table's minimum hold; the staff may book anything that fits.

Availability::slotsByService()

public function slotsByService(\DateTimeInterface $day, int $covers, bool $online = true): array
Returns

the slots by service name, for a form

Availability::openDays()

public function openDays(int $covers, ?\DateTimeInterface $from = null, int $count = 14): array

The next days with at least one time for that many, from $from on.

Returns

Y-m-d

Availability::book()

public function book(Reservation $reservation, string $day, string $time, bool $online = true): Reservation

Takes (or moves) the reservation to that day and time: the tables given, the service and the length set, confirmed or asked for, saved.

Under the day's lock, the free tables are read again.

Throws

UnavailableException (book.error.unavailable) when it does not fit any more

Availability::seatAt()

public function seatAt(Reservation $reservation, array $tables): Reservation

The staff seat a party at given tables, now or at a time: no check but the lock - the floor is theirs (a walk-in squeezed in, a move by hand).

ColdChain class

class ColdChain ColdChain.php:31

How fresh dishes may leave the restaurant. omnibase/marketplace hands an order over (Entity\Order\Pickup) and offers every shipping method to every basket; what may travel cold, and when, is decided here:

  • collected at the restaurant, on a slot of a day it is open for it;
  • brought nearby by the restaurant itself, to the postcodes of restaurant.delivery.zip_codes, from a minimum basket;
  • a chilled parcel, only when every dish of the basket may travel (TakeHome::isParcel()), when the shortest use-by date outlasts the journey and leaves the days asked on arrival, and handed to the carrier from Monday to Wednesday (restaurant.parcel.ship_days): a parcel that left on a Thursday could spend the weekend in a depot. No carrier configured (Service\ParcelCarrier), no parcel.

The dishes are made for the day asked: that day is the one they are made on, and their use-by dates count from it.

ColdChain::__construct()

public function __construct(readonly Pickups $pickups, readonly ?ParcelCarrier $carrier = null, readonly bool $pickup = true, readonly int $noticeDays = 1, readonly array $zipCodes = [], readonly int $deliveryMinimum = 0, readonly array $parcel = [])
$parcel

enabled, ship_days (1 Monday … 7 Sunday), transit_days, margin_days, cutoff

ColdChain::options()

public function options(array $lines, ?string $postcode = null, ?\DateTimeImmutable $now = null): array

Every way, for this basket: offered or not and why, and its days.

Returns

by mode ("pickup", "delivery", "shipping")

ColdChain::check()

public function check(PickupMode $mode, array $lines, \DateTimeImmutable $day, ?string $postcode = null, ?\DateTimeImmutable $now = null): void

This basket, this way, for this day - or why not.

Throws

RestaurantException with a key of the "restaurant" translations (takehome.error.*)

ColdChain::days()

public function days(?\DateTimeImmutable $now = null): array
Returns

the days an order may be collected or brought

ColdChain::shippingDays()

public function shippingDays(?\DateTimeImmutable $now = null): array
Returns

the next days a parcel may be handed to the carrier (four weeks ahead)

ColdChain::arrival()

public function arrival(\DateTimeImmutable $shipped): \DateTimeImmutable

The day a parcel that leaves on $shipped is delivered.

ColdChain::useBy()

public function useBy(array $lines, \DateTimeImmutable $madeOn): ?\DateTimeImmutable

The use-by date of a basket made on this day: its shortest.

ColdChain::travelling()

public function travelling(array $lines): array

Those of these lines that may go in a chilled parcel: the dish travels, and keeps long enough.

ColdChain::deliversTo()

public function deliversTo(?string $postcode): bool

FloorPlan class

class FloorPlan FloorPlan.php:18

Which layout each room is in for a service on a day - one taking over that date, else the service's (when it is this room's), else the room's default, else the tables where they stand - and so the tables in use and those joined.

FloorPlan::__construct()

public function __construct(readonly RoomRepository $rooms)

FloorPlan::layoutOf()

public function layoutOf(Room $room, ?\DateTimeInterface $day = null, ?MealService $service = null): ?Layout

FloorPlan::floor()

public function floor(?\DateTimeInterface $day = null, ?MealService $service = null, ?array $rooms = null): Floor
$rooms

every room when null

FloorPlan::drawing()

public function drawing(Room $room, ?Layout $layout): array

The room drawn as its layout puts it: each table with its place there.

ParcelCarrier class

class ParcelCarrier ParcelCarrier.php:17

Who carries the chilled parcels: the shop's shipping method named by restaurant.parcel.shipping_method (its slug), whose carrier is a glitchr/omnibus gateway - omnibus/chronopost with the Chronofresh product.

Without the method, without the package or without the carrier's account, there is no chilled parcel and the mode is not offered.

ParcelCarrier::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly Shipping $shipping, readonly ?string $slug = null)

ParcelCarrier::shippingMethod()

public function shippingMethod(): ?ShippingMethod

ParcelCarrier::isConfigured()

public function isConfigured(): bool

Pass class

class Pass Pass.php:36

"Le passe": the one screen the floor runs on. The room as it is now - each table free, booked soon, seated, waiting for the kitchen, with something ready, calling, asking for the bill -, the tickets of every channel in columns (to accept, in the kitchen, ready, served), the day's reservations; and what the staff do there: move a ticket along, settle a table, move guests to another table, run a dish out.

const SOON = 45

A table booked within this many minutes shows as booked

Pass::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly TicketRepository $tickets, readonly SessionRepository $sessions, readonly ReservationRepository $reservations, readonly RoomRepository $rooms, readonly MealServiceRepository $services, readonly DishRepository $dishes, readonly FloorPlan $plans, readonly Availability $availability, readonly Revision $revision, readonly EventDispatcherInterface $dispatcher, readonly int $acceptWarning = 180)

Pass::board()

public function board(?Station $station = null): array

Everything the screen draws.

Pass::state()

public function state(): array

What the pass's poll compares: the revision (redraw) and the newest ticket to accept (ring).

Pass::tableState()

public function tableState(Table $table, ?Session $session, array $reservations, \DateTimeImmutable $now): array

A table as the floor shows it now.

$reservations

the day's

Pass::move()

public function move(Ticket $ticket, string $action, ?string $reason = null): void

accept, start, ready, serve, refuse, cancel - or "forward", the next step.

Throws

TransitionException

Pass::settle()

public function settle(Session $session, string $with = 'till', ?int $amount = null): void

The bill paid (at the till, or from a phone): the table is free, and none of its rounds stays on the pass - what was still open is served (Session::closeTickets()), and the listeners are told of each.

Pass::transfer()

public function transfer(Session $session, Table $to): void

The guests (and their bill, their reservation) moved to another table.

Pass::seat()

public function seat(Reservation $reservation): ?Session

Seat a reservation: its table's bill opened and tied to it.

Pass::answerCall()

public function answerCall(Session $session): void

Pass::toggleOrdering()

public function toggleOrdering(Table $table): void

Guests may order from their phones at this table, or not any more.

Pass::stock()

public function stock(Dish $dish, bool $available): void

Run out ("rupture"), or back.

Pass::now()

public function now(): \DateTimeImmutable

The restaurant's wall-clock now.

Pass::rooms()

public function rooms(): array

Reservations class

class Reservations Reservations.php:31

The reservation book's actions: a guest's request from the site, the staff's from the phone, the guest's change and cancellation through the management link, the evening's steps on the pass. Each one dispatched (ReservationChangedEvent) and, for the guest, mailed: the confirmation carries the management link and the calendar file (glitchr/omnibase's Ics).

Reservations::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly Availability $availability, readonly Ics $ics, readonly OpeningHours $hours, readonly UrlGeneratorInterface $urls, readonly EventDispatcherInterface $dispatcher, readonly TranslatorInterface $translator, readonly ?MailerInterface $mailer = null, readonly ?LoggerInterface $logger = null, readonly ?string $from = null, readonly ?string $notify = null, readonly int $cancelUntil = 120)

Reservations::request()

public function request(Booking $booking, ?string $locale = null): Reservation
Throws

UnavailableException

Reservations::take()

public function take(Reservation $reservation, string $day, string $time, string $source = Reservation::SOURCE_PHONE): Reservation

Taken by the staff (the phone, a walk-in): confirmed, at any free table - or none, when they say so.

Reservations::change()

public function change(Reservation $reservation, string $day, string $time, int $covers): Reservation

The guest moves it (another day, time or size), through the management link.

@throws UnavailableException|TransitionException

Reservations::reschedule()

public function reschedule(Reservation $reservation, string $day, string $time, ?int $covers = null): Reservation

Moved by the staff, from the pass or the book: another day, time or size, at any free table - whatever the online rules say (the notice, the minimum of a table), as take(). A guest with an address is told.

Throws

UnavailableException|\TransitionException

Reservations::cancel()

public function cancel(Reservation $reservation, bool $byGuest = true): void

Cancelled by the guest (the link) or by the staff.

Reservations::move()

public function move(Reservation $reservation, ReservationStatus $to, bool $fromPlatform = false): void

The pass's steps: confirm or refuse a request, seat, finish, absent.

Throws

TransitionException

Reservations::changeable()

public function changeable(Reservation $reservation): bool

Still time for the guest to change or cancel it online.

Reservations::calendarEntry()

public function calendarEntry(Reservation $reservation, string $title, ?string $location = null): CalendarEntry

Reservations::ics()

public function ics(Reservation $reservation, string $title, ?string $location = null): string

Revision class

class Revision Revision.php:14

One number that grows whenever the floor changes - a reservation, a bill, a ticket written (EventListener\RevisionListener): the pass and the guests' phones ask it every few seconds (the poll controller) and redraw when it has grown. Milliseconds, kept in the cache: no query to answer it.

Revision::__construct()

public function __construct(readonly CacheItemPoolInterface $cache)

Revision::current()

public function current(): int

Revision::bump()

public function bump(): int

Seating class

class Seating Seating.php:27

Where and when a party fits - the reckoning alone, nothing read nor written (Availability does that, under a lock):

  • a time is offered when the service runs that day, the place is open then (glitchr/omnibase's OpeningHours: the usual week and the days off), it is far enough ahead, the service has covers left, and a table
  • or tables joined in the layout - is free for as long as such a party keeps it;
  • the table given is the smallest that seats the party (a table's minimum is kept online, not by the staff); joined tables only when no single one does, the smallest group first.

Every time is the restaurant's wall-clock time, compared as written.

Seating::__construct()

public function __construct(readonly OpeningHours $hours)

Seating::slots()

public function slots(MealService $service, \DateTimeInterface $day, int $covers, Floor $floor, array $holding, ?\DateTimeInterface $now = null, int $notice = 0, bool $strict = true): array

The times a party of $covers can be seated at in $service on $day.

$holding

the reservations holding tables that day

$notice

minutes from $now before the first time offered

Seating::fit()

public function fit(int $covers, Floor $floor, array $busy, bool $strict = true): ?array

The tables for a party, among those not $busy: the smallest single table first, else the smallest group of joined tables. $strict (online) keeps the tables that are not offered online and each table's minimum.

$busy

table id => busy

Seating::busy()

public function busy(array $holding, string $from, string $until): array

The tables held between those two wall-clock times ("Y-m-d H:i").

Seating::coversTaken()

public function coversTaken(MealService $service, array $holding): int

TableOrders class

class TableOrders TableOrders.php:32

Ordering at the table, as in Japan: the guests scan their table's code, which opens (or joins) the table's bill - no account, no app - and send their rounds from their phones, call the waiter, ask for the bill. Each round is a ticket on the pass, waiting to be accepted there. The prices are the menu's, VAT included (omnibase/marketplace's Pricing), copied on the ticket when it is sent.

TableOrders::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly SessionRepository $sessions, readonly DishRepository $dishes, readonly Pricing $pricing, readonly EventDispatcherInterface $dispatcher, readonly ProductOptions $options, readonly int $maxLines = 40, readonly int $maxQuantity = 20)

TableOrders::session()

public function session(Table $table, bool $open = true): ?Session

The table's open bill; a new one when $open and there is none.

TableOrders::send()

public function send(Session $session, Round $round, ?string $locale = null): Ticket

A round sent: checked line by line against the menu (on sale, in stock, orderable at the table, sensible quantities), priced, saved, on the pass.

Throws

RestaurantException with a key of the "restaurant" translations (table.error.*)

TableOrders::callWaiter()

public function callWaiter(Session $session): void

TableOrders::requestBill()

public function requestBill(Session $session): void

TableOrders::state()

public function state(Session $session): array

What a guest's phone shows: the table's rounds and where each stands, the total.

TableOrders::progress()

public function progress(Session $session): array

TablePayments class

class TablePayments TablePayments.php:28

A table's bill paid from a phone (restaurant.table.pay_online): the billed rounds become the lines of an omnibase/marketplace order - no account: an e-mail address for the receipt -, paid through the shop's gateways (QuickOrder::buy()); paid, the bill is settled "online" and the table is free, as at the till (Pass::settle()).

A quick order is priced by the shop, from the dishes: a bill that the shop would not price the same - a round with paid options, a platform's price, a dish since removed - is settled at the till.

TablePayments::__construct()

public function __construct(readonly QuickOrder $quickOrder, readonly Pass $pass, readonly SessionRepository $sessions, readonly Pricing $pricing, readonly EntityManagerInterface $entityManager, readonly bool $enabled = false)

TablePayments::isEnabled()

public function isEnabled(): bool

TablePayments::isOffered()

public function isOffered(Session $session): bool

Whether this bill can be paid from a phone now.

TablePayments::lines()

public function lines(Session $session): ?array

The bill as lines of an order: the dishes of its rounds (those refused or cancelled left out), their quantities added up. Null when the shop would not charge what the bill says.

TablePayments::pay()

public function pay(Session $session, string $email, ?User $signedIn = null): QuickPayment
Throws

RestaurantException table.error.pay_till, or "@marketplace.quick.error.…"

TablePayments::settle()

public function settle(Order $order): ?Session

An order is paid: the bill it pays, if it pays one, is settled - once.

TakeHomeOrders class

class TakeHomeOrders TakeHomeOrders.php:32

An order of the take-home shop, without an account: the dishes, an e-mail address, how it leaves. The cold chain says whether it may leave that way on that day (Service\ColdChain); omnibase/marketplace's quick order makes the order for the address and takes the payment (QuickOrder::buy()); its hand-over is written (Pickup: the mode, the day and slot, who, where) and the customer follows it on /suivi/{token}. Paid, it is a ticket on the pass (Service\TakeawayTickets).

A delivery or a parcel is charged as a line of the order - a product of the shop named by restaurant.delivery.fee_product / restaurant.parcel.fee_product: a quick order has no shipping charge of its own.

TakeHomeOrders::__construct()

public function __construct(readonly QuickOrder $quickOrder, readonly ColdChain $coldChain, readonly Pickups $pickups, readonly TakeHomeRepository $dishes, readonly EntityManagerInterface $entityManager, readonly int $maxQuantity = 20, readonly ?string $deliveryFee = null, readonly ?string $parcelFee = null)

TakeHomeOrders::isOpen()

public function isOpen(): bool

TakeHomeOrders::slots()

public function slots(): array
Returns

every slot of a day ("11:00-11:30", …): the form's list, checked against the day chosen when the order comes

TakeHomeOrders::fee()

public function fee(PickupMode $mode): ?Product

The product charged for bringing or sending an order, when the shop names one.

TakeHomeOrders::place()

public function place(TakeHomeOrder $request, ?User $signedIn = null): array
Throws

RestaurantException with a key of the "restaurant" translations (takehome.error.*), or "@marketplace.…"

TakeawayTickets class

class TakeawayTickets TakeawayTickets.php:32

The shop's orders on the pass. A paid order with a hand-over (omnibase/marketplace's Pickup, received) that holds the restaurant's products - take-home dishes, dishes of the menu - becomes a ticket of the "takeaway" channel, to accept and prepare like any other; and as the ticket moves, so does the hand-over the customer follows on /suivi/{token}: accepted, in preparation, ready, then handed over - or on its way, for a delivery or a parcel.

TakeawayTickets::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly TicketRepository $tickets, readonly Pickups $pickups, readonly EventDispatcherInterface $dispatcher)

TakeawayTickets::of()

public function of(Order|string $order): ?Ticket

TakeawayTickets::fromPickup()

public function fromPickup(Pickup $pickup): ?Ticket

The ticket of a received hand-over - made once; null when the order holds nothing of the kitchen's.

TakeawayTickets::follow()

public function follow(Ticket $ticket): void

A take-away ticket moved on the pass: its hand-over follows.

Base\Restaurant\Twig

ReviewsTwigExtension class

final class ReviewsTwigExtension extends AbstractExtension ReviewsTwigExtension.php:17

restaurant_reviews(): the platforms the restaurant's page shows reviews from - none without glitchr/omnireview, none without a configured gateway. restaurant_review_widget(gateway, place): the family's own widget (omnireview_widget(), @Omnireview/reviews.html.twig), named here so that the bundle's templates compile on a site without the family.

ReviewsTwigExtension::__construct()

public function __construct(readonly ?RestaurantReviews $reviews = null)

ReviewsTwigExtension::getFunctions()

public function getFunctions(): array