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.
RestaurantBundleclassA 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
RestaurantReviewsWidgetTypeclassWhat 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
RestaurantTodayWidgetTypeclassThe day at a glance: covers booked, reservations to confirm, tickets on the pass.
4 methods
Base\Restaurant\Controller\Admin
FloorControllerclassThe 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
OpenToManagersTraittraitThe 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
DishCrudControllerclassThe dishes: the shop's product screen, and what a menu says besides (native name, section, allergens, diets, spice, station).
4 methods
LayoutCrudControllerclassThe layouts by name; the tables are moved and joined in the floor editor.
4 methods
MealServiceCrudControllerclassThe 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
MenuSectionCrudControllerclassThe menu's sections, in their order.
4 methods
ReservationCrudControllerclassThe reservation book as a list (the pass is where the evening is run).
6 methods
RoomCrudControllerclassThe rooms: a name, a size; the tables and the walls are drawn in the floor editor (/admin/restaurant/salle).
4 methods
SetMenuCrudControllerclassThe set menus: a dish whose courses are listed, served at one service when it says so.
3 methods
TableCrudControllerclassThe tables as a list; their places are set in the floor editor.
5 methods
TakeHomeCrudControllerclassThe 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
TicketCrudControllerclassThe tickets as they were: read only (the pass moves them).
5 methods
Base\Restaurant\Controller\Client
MenuControllerclassThe 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
PassControllerclassLe 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
PlatformWebhookControllerclassWhere 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
ReservationControllerclassBooking 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
TableControllerclassWhat 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
TablePaymentControllerclass"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
TakeHomeControllerclassThe 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
TakeHomeOrderControllerclassOrdering 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
RestaurantDemoAccountsclassThe 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
RestaurantConfigurationclass1 method
RestaurantExtensionclass2 methods
LayoutclassA 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
MealServiceclassA 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
PlatformEventclassA platform's webhook already handled: platforms retry, and the same event (Omnifood\Model\Notification::$id) must make one ticket, not two.
6 methods
ReservationclassA 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
RoomclassA 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
TableclassA 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
DishclassA 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
MenuSectionclassA 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
SetMenuclassA 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
SessionclassA 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
TicketclassWhat 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
TicketLineclassOne 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
TakeHomeclassA 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
DietenumWhat a dish suits, shown as pills and filtered on the menu (the allergens are glitchr/omnibase's Base\Enum\Allergen).
3 methods · 4 cases
KeepingenumHow 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
ReservationStatusenumWhere 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
SessionStatusenumA table's bill: open while the guests order, asked for, settled (at the till, or from a phone).
2 methods · 3 cases
StationenumWhere a dish is made: the hot kitchen, the cold side (sushi, salads, desserts), the bar. The pass filters by it.
1 method · 3 cases
TableShapeenumHow a table is drawn on the floor plan. A counter is a row of stools: one seat per 60 cm.
1 method · 4 cases
TicketChannelenumWhere a ticket comes from: a table's phones, the counter (to take away), a delivery platform (Ticket::$platform names which).
1 method · 3 cases
TicketStatusenumA ticket's way through the kitchen, whatever its channel:
7 methods · 7 cases
DishAvailabilityEventclassA dish run out on the pass, or back: the Omnifood bridge suspends it on the platforms, or brings it back.
1 method · 2 properties
ReservationChangedEventclassA reservation taken, moved or moved along (confirmed, seated, cancelled...).
1 method · 3 properties
TicketMovedEventclassA 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
QuickOrderListenerclassWhat 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
RevisionListenerclassAnything of the restaurant written: the revision the pass watches grows.
3 methods
TakeawayListenerclassThe 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
RestaurantExceptionclassSomething the guest or the staff should read: the message is a key of the "restaurant" translations, with its parameters.
1 method · 1 property
TransitionExceptionclassA ticket or a reservation asked to go where its status does not lead.
UnavailableExceptionclassNo 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.
BookingTypeclassThe 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
TakeHomeOrderTypeclassAn 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
BillPaymentclassWhat a phone sends to pay its table's bill (#[MapRequestPayload]): where the receipt goes.
1 property
BookingclassWhat 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
FloorclassThe 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
HandOverclassOne 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
RoundclassA round sent from a table's phone (#[MapRequestPayload]): its lines, and a word for the kitchen.
3 properties
RoundLineclassOne line of a round sent from a table's phone.
2 methods · 4 properties
SlotclassA time a party can be seated at, in which service, at which tables, for how long.
3 methods · 5 properties
TakeHomeOrderclassAn 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
FoodKeysSectionclassThe 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
MenuExportclassThe 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
OrderTicketsclassA 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
PlatformHealthclassHow 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
PlatformSubscriberclassWhat 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
PlatformsclassThe 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
ReceiverclassA 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
MenuPushCommandclassThe menu sent to the delivery platforms (each replaces its own): all of them, or the one named.
1 method
ReservationsSyncCommandclassThe booking platforms' reservations read and put in the book - what their webhooks missed. Run by the cron container every few minutes.
1 method
DishRepositoryclass3 methods
LayoutRepositoryclass2 methods
MealServiceRepositoryclass4 methods
ReservationRepositoryclassReservations 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.
9 methods
RoomRepositoryclass2 methods
SessionRepositoryclass5 methods
TableRepositoryclass4 methods
TakeHomeRepositoryclass3 methods
TicketRepositoryclass6 methods
RestaurantReviewsclassThe 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
AvailabilityclassThe 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
ColdChainclassHow 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
FloorPlanclassWhich 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
ParcelCarrierclassWho 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
Passclass"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
ReservationsclassThe 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
RevisionclassOne 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
SeatingclassWhere and when a party fits - the reckoning alone, nothing read nor written (Availability does that, under a lock):
5 methods
TableOrdersclassOrdering 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
TablePaymentsclassA 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
TakeHomeOrdersclassAn 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
TakeawayTicketsclassThe 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
ReviewsTwigExtensionclassrestaurant_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(): stringRestaurantBundle::build()
public function build(ContainerBuilder $container): voidBase\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(): stringRestaurantReviewsWidgetType::getTemplate()
public function getTemplate(): stringRestaurantReviewsWidgetType::getTemplateVars()
public function getTemplateVars(MenuItem $widget): arrayRestaurantTodayWidgetType 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(): stringRestaurantTodayWidgetType::getTemplate()
public function getTemplate(): stringRestaurantTodayWidgetType::getTemplateVars()
public function getTemplateVars(MenuItem $widget): arrayBase\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): ResponseFloorController::newRoom()
public function newRoom(Request $request): ResponseFloorController::newLayout()
public function newLayout(Request $request, Room $room): ResponseFloorController::save()
public function save(Request $request, Room $room): JsonResponseThe 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): ResponseThe 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): ResponseA 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(): stringDishCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringDishCrudController::configureFields()
public function configureFields(string $pageName): iterableDishCrudController::menuFields()
public static function menuFields(): iterableLayoutCrudController 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(): stringLayoutCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringLayoutCrudController::configureActions()
public function configureActions(Actions $actions): ActionsLayoutCrudController::configureFields()
public function configureFields(string $pageName): iterableMealServiceCrudController 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(): stringMealServiceCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringMealServiceCrudController::configureActions()
public function configureActions(Actions $actions): ActionsMealServiceCrudController::configureFields()
public function configureFields(string $pageName): iterableMenuSectionCrudController class
class MenuSectionCrudController extends AbstractCrudController MenuSectionCrudController.php:15
The menu's sections, in their order.
MenuSectionCrudController::getEntityFqcn()
public static function getEntityFqcn(): stringMenuSectionCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringMenuSectionCrudController::configureActions()
public function configureActions(Actions $actions): ActionsMenuSectionCrudController::configureFields()
public function configureFields(string $pageName): iterableReservationCrudController 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(): stringReservationCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringReservationCrudController::configureCrud()
public function configureCrud(Crud $crud): CrudReservationCrudController::configureActions()
public function configureActions(Actions $actions): ActionsReservationCrudController::configureFilters()
public function configureFilters(Filters $filters): FiltersReservationCrudController::configureFields()
public function configureFields(string $pageName): iterableRoomCrudController 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(): stringRoomCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringRoomCrudController::configureActions()
public function configureActions(Actions $actions): ActionsRoomCrudController::configureFields()
public function configureFields(string $pageName): iterableSetMenuCrudController 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(): stringSetMenuCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringSetMenuCrudController::configureFields()
public function configureFields(string $pageName): iterableTableCrudController 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(): stringTableCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringTableCrudController::configureActions()
public function configureActions(Actions $actions): ActionsTableCrudController::configureFilters()
public function configureFilters(Filters $filters): FiltersTableCrudController::configureFields()
public function configureFields(string $pageName): iterableTakeHomeCrudController 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(): stringTakeHomeCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringTakeHomeCrudController::configureFields()
public function configureFields(string $pageName): iterableTicketCrudController 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(): stringTicketCrudController::getPreferredIcon()
public static function getPreferredIcon(): ?stringTicketCrudController::configureCrud()
public function configureCrud(Crud $crud): CrudTicketCrudController::configureActions()
public function configureActions(Actions $actions): ActionsTicketCrudController::configureFields()
public function configureFields(string $pageName): iterableBase\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(): ResponseMenuController::print()
public function print(): ResponsePassController 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): ResponsePassController::board()
public function board(Request $request): ResponsePassController::state()
public function state(): JsonResponsePassController::ticket()
public function ticket(Request $request, Ticket $id, string $action): ResponsePassController::table()
public function table(Request $request, Table $id, string $action): ResponsePassController::reservation()
public function reservation(Request $request, Reservation $id, string $action): ResponsePassController::book()
public function book(Request $request): ResponseA reservation taken on the phone, or a walk-in seated now.
PassController::dish()
public function dish(Request $request, Dish $id, string $action): ResponsePassController::platform()
public function platform(Request $request, string $name, string $action): ResponsePlatformWebhookController 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): JsonResponseReservationController 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): ResponseReservationController::slots()
public function slots(string $jour = '', int $couverts = 2): JsonResponseThe times free that day for that many: the form asks as the guest picks.
ReservationController::manage()
public function manage(Request $request, string $token): ResponseReservationController::ics()
public function ics(string $token): ResponseTableController 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): ResponseTableController::state()
public function state(string $token, \Base\Restaurant\Service\Revision $revision): JsonResponseTableController::round()
public function round(Request $request, string $token, Round $round): JsonResponseTableController::call()
public function call(Request $request, string $token): JsonResponseTableController::bill()
public function bill(Request $request, string $token): JsonResponseTablePaymentController 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): JsonResponseTakeHomeController 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): ResponseTakeHomeController::show()
public function show(string $slug): ResponseTakeHomeController::track()
public function track(string $token, PickupRepository $pickups, TakeawayTickets $tickets): ResponseTakeHomeOrderController 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): ResponseBase\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(): iterableBase\Restaurant\DependencyInjection
RestaurantConfiguration class
class RestaurantConfiguration extends AbstractBaseConfiguration RestaurantConfiguration.php:8
RestaurantConfiguration::getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilderRestaurantExtension class
class RestaurantExtension extends AbstractBaseExtension RestaurantExtension.php:11
RestaurantExtension::getConfiguration()
public function getConfiguration(array $config, ContainerBuilder $container): RestaurantConfigurationRestaurantExtension::load()
public function load(array $configs, ContainerBuilder $container): voidBase\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(): stringLayout::getId()
public function getId(): ?intLayout::getRoom()
public function getRoom(): ?RoomLayout::setRoom()
public function setRoom(?Room $room): selfLayout::getName()
public function getName(): stringLayout::setName()
public function setName(string $name): selfLayout::isDefault()
public function isDefault(): boolLayout::setDefault()
public function setDefault(bool $default): selfLayout::getPositions()
public function getPositions(): arrayLayout::setPositions()
public function setPositions(array $positions): selfLayout::place()
public function place(Table $table, int $x, int $y, int $rotation = 0, bool $active = true): selfLayout::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): boolLayout::getJoins()
public function getJoins(): arrayLayout::setJoins()
public function setJoins(array $joins): selfEach group: two tables or more, each table in one group only.
Layout::join()
public function join(Table ...$tables): selfLayout::getDates()
public function getDates(): arrayLayout::setDates()
public function setDates(array|string|null $dates): self$dates"Y-m-d" each, or one per line
Layout::getDatesText()
public function getDatesText(): stringLayout::setDatesText()
public function setDatesText(?string $text): selfLayout::takesOver()
public function takesOver(\DateTimeInterface $day): boolMealService 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(): stringMealService::getId()
public function getId(): ?intMealService::getName()
public function getName(): stringMealService::setName()
public function setName(string $name): selfMealService::getWeekdays()
public function getWeekdays(): arrayMealService::setWeekdays()
public function setWeekdays(array $weekdays): selfMealService::runsOn()
public function runsOn(\DateTimeInterface $day): boolMealService::getFirstSeating()
public function getFirstSeating(): stringMealService::setFirstSeating()
public function setFirstSeating(string $time): selfMealService::getLastSeating()
public function getLastSeating(): stringMealService::setLastSeating()
public function setLastSeating(string $time): selfMealService::getStep()
public function getStep(): intMealService::setStep()
public function setStep(int $step): selfMealService::times()
public function times(): array- Returns
"12:00", "12:15"... the times offered, first to last
MealService::covers()
public function covers(string $time): boolMealService::getDurations()
public function getDurations(): arrayMealService::setDurations()
public function setDurations(array $durations): selfMealService::getDurationsText()
public function getDurationsText(): string"2: 75" per line, for a form
MealService::setDurationsText()
public function setDurationsText(?string $text): selfMealService::durationFor()
public function durationFor(int $covers): intMinutes a table is kept for so many covers.
MealService::getMaxCovers()
public function getMaxCovers(): ?intMealService::setMaxCovers()
public function setMaxCovers(?int $maxCovers): selfMealService::getAutoConfirm()
public function getAutoConfirm(): ?intMealService::setAutoConfirm()
public function setAutoConfirm(?int $autoConfirm): selfMealService::confirmsAtOnce()
public function confirmsAtOnce(int $covers): boolMealService::getLayout()
public function getLayout(): ?LayoutMealService::setLayout()
public function setLayout(?Layout $layout): selfMealService::isActive()
public function isActive(): boolMealService::setActive()
public function setActive(bool $active): selfMealService::getPosition()
public function getPosition(): intMealService::setPosition()
public function setPosition(int $position): selfMealService::minutes()
public static function minutes(string $time): intPlatformEvent 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(): ?intPlatformEvent::getPlatform()
public function getPlatform(): stringPlatformEvent::getEventId()
public function getEventId(): stringPlatformEvent::getEvent()
public function getEvent(): stringPlatformEvent::getReceivedAt()
public function getReceivedAt(): \DateTimeImmutableReservation 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(): voidReservation::__toString()
public function __toString(): stringReservation::getId()
public function getId(): ?intReservation::getService()
public function getService(): ?MealServiceReservation::setService()
public function setService(?MealService $service): selfReservation::getStartsAt()
public function getStartsAt(): \DateTimeImmutableThe wall-clock time in the restaurant's zone (the zone PHP happens to hydrate it in is meaningless).
Reservation::getEndsAt()
public function getEndsAt(): \DateTimeImmutableReservation::schedule()
public function schedule(\DateTimeImmutable $startsAt, int $minutes): selfWhen, and for how long (minutes).
Reservation::setStartsAt()
public function setStartsAt(\DateTimeImmutable $startsAt): selfReservation::getDay()
public function getDay(): stringReservation::getTime()
public function getTime(): stringReservation::getMinutes()
public function getMinutes(): intReservation::overlaps()
public function overlaps(string $from, string $until): boolBoth wall-clock "Y-m-d H:i", compared as such.
Reservation::getCovers()
public function getCovers(): intReservation::setCovers()
public function setCovers(int $covers): selfReservation::getName()
public function getName(): stringReservation::setName()
public function setName(?string $name): selfReservation::getPhone()
public function getPhone(): ?stringReservation::setPhone()
public function setPhone(?string $phone): selfReservation::getEmail()
public function getEmail(): ?stringReservation::setEmail()
public function setEmail(?string $email): selfReservation::getNotes()
public function getNotes(): ?stringReservation::setNotes()
public function setNotes(?string $notes): selfReservation::getAllergies()
public function getAllergies(): ?stringReservation::setAllergies()
public function setAllergies(?string $allergies): selfReservation::getStatus()
public function getStatus(): ReservationStatusReservation::setStatus()
public function setStatus(ReservationStatus|string $status): selfForced: the pass and the platforms go through ReservationStatus::canBecome() first.
Reservation::getStatusName()
public function getStatusName(): stringReservation::setStatusName()
public function setStatusName(?string $status): selfReservation::holds()
public function holds(): boolReservation::getTables()
public function getTables(): CollectionReservation::assign()
public function assign(iterable $tables): selfReservation::getTablesLabel()
public function getTablesLabel(): stringReservation::sits()
public function sits(Table $table): boolReservation::getSource()
public function getSource(): stringReservation::setSource()
public function setSource(string $source): selfReservation::isFromPlatform()
public function isFromPlatform(): boolReservation::getExternalRef()
public function getExternalRef(): ?stringReservation::setExternalRef()
public function setExternalRef(?string $externalRef): selfReservation::getToken()
public function getToken(): stringReservation::getLocale()
public function getLocale(): ?stringReservation::setLocale()
public function setLocale(?string $locale): selfReservation::getCreatedAt()
public function getCreatedAt(): \DateTimeImmutableReservation::getUpdatedAt()
public function getUpdatedAt(): \DateTimeImmutableRoom 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(): stringRoom::getId()
public function getId(): ?intRoom::getName()
public function getName(): stringRoom::setName()
public function setName(string $name): selfRoom::getWidth()
public function getWidth(): intRoom::setWidth()
public function setWidth(int $width): selfRoom::getHeight()
public function getHeight(): intRoom::setHeight()
public function setHeight(int $height): selfRoom::setSize()
public function setSize(int $width, int $height): selfRoom::getPosition()
public function getPosition(): intRoom::setPosition()
public function setPosition(int $position): selfRoom::getDecor()
public function getDecor(): arrayRoom::setDecor()
public function setDecor(array $decor): selfOnly what the editor knows how to draw is kept, in whole centimetres.
Room::getTables()
public function getTables(): CollectionRoom::getActiveTables()
public function getActiveTables(): arrayRoom::addTable()
public function addTable(Table $table): selfRoom::removeTable()
public function removeTable(Table $table): selfRoom::getLayouts()
public function getLayouts(): CollectionRoom::addLayout()
public function addLayout(Layout $layout): selfRoom::removeLayout()
public function removeLayout(Layout $layout): selfRoom::getDefaultLayout()
public function getDefaultLayout(): ?LayoutRoom::getCapacity()
public function getCapacity(): intTable 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(): stringTable::__toString()
public function __toString(): stringTable::getId()
public function getId(): ?intTable::getRoom()
public function getRoom(): ?RoomTable::setRoom()
public function setRoom(?Room $room): selfTable::getLabel()
public function getLabel(): stringTable::setLabel()
public function setLabel(string $label): selfTable::getMinCovers()
public function getMinCovers(): intTable::setMinCovers()
public function setMinCovers(int $minCovers): selfTable::getMaxCovers()
public function getMaxCovers(): intTable::setMaxCovers()
public function setMaxCovers(int $maxCovers): selfTable::setCovers()
public function setCovers(int $min, int $max): selfTable::seats()
public function seats(int $covers): boolTable::getShape()
public function getShape(): TableShapeTable::setShape()
public function setShape(TableShape|string $shape): selfTable::getShapeName()
public function getShapeName(): stringTable::setShapeName()
public function setShapeName(?string $shape): selfTable::getX()
public function getX(): intTable::setX()
public function setX(int $x): selfTable::getY()
public function getY(): intTable::setY()
public function setY(int $y): selfTable::getWidth()
public function getWidth(): intTable::setWidth()
public function setWidth(int $width): selfTable::getHeight()
public function getHeight(): intTable::setHeight()
public function setHeight(int $height): selfTable::getRotation()
public function getRotation(): intTable::setRotation()
public function setRotation(int $rotation): selfTable::place()
public function place(int $x, int $y, ?int $width = null, ?int $height = null, ?int $rotation = null): selfTable::getToken()
public function getToken(): stringTable::regenerateToken()
public function regenerateToken(): selfA new code: the posters printed before stop working.
Table::isActive()
public function isActive(): boolTable::setActive()
public function setActive(bool $active): selfTable::isOrdering()
public function isOrdering(): boolTable::setOrdering()
public function setOrdering(bool $ordering): selfTable::isBookable()
public function isBookable(): boolTable::setBookable()
public function setBookable(bool $bookable): selfTable::getPosition()
public function getPosition(): intTable::setPosition()
public function setPosition(int $position): selfBase\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(): ?arrayDish::getNativeName()
public function getNativeName(): ?stringDish::setNativeName()
public function setNativeName(?string $name): selfDish::getIllustration()
public function getIllustration(): ?stringDish::setIllustration()
public function setIllustration(?string $illustration): selfDish::getAllergens()
public function getAllergens(): arrayDish::setAllergens()
public function setAllergens(iterable $allergens): selfDish::getAllergenCases()
public function getAllergenCases(): arrayDish::contains()
public function contains(Allergen|string $allergen): boolDish::getDiets()
public function getDiets(): arrayDish::setDiets()
public function setDiets(iterable $diets): selfDish::getDietCases()
public function getDietCases(): arrayDish::suits()
public function suits(Diet|string $diet): boolDish::getSpice()
public function getSpice(): intDish::setSpice()
public function setSpice(?int $spice): selfDish::getStation()
public function getStation(): StationDish::setStation()
public function setStation(Station|string|null $station): selfDish::getStationName()
public function getStationName(): stringDish::setStationName()
public function setStationName(?string $station): selfDish::getSection()
public function getSection(): ?MenuSectionDish::setSection()
public function setSection(?MenuSection $section): selfDish::getMenuPosition()
public function getMenuPosition(): intDish::setMenuPosition()
public function setMenuPosition(?int $position): selfDish::isTableOrder()
public function isTableOrder(): boolDish::setTableOrder()
public function setTableOrder(?bool $tableOrder): selfDish::getCourses()
public function getCourses(): arrayWhat a set menu lists; a plain dish has none (asked of any dish by the templates).
@return list<string>
Dish::getPosRef()
public function getPosRef(): stringIts reference for the platforms (Omnifood's Item::$ref) and the tickets.
Dish::isAvailable()
public function isAvailable(): boolCan be ordered now: on sale and in stock.
Dish::isOutOfStock()
public function isOutOfStock(): boolRun out for now ("rupture" on the pass): still on the menu, greyed.
Dish::isOnMenu()
public function isOnMenu(): boolOn the menu at all: on sale, or only run out for now.
Dish::runOut()
public function runOut(): selfDish::restock()
public function restock(): selfDish::isShippable()
public function isShippable(): boolEaten 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(): ?arrayMenuSection::getMenuPosition()
public function getMenuPosition(): intMenuSection::setMenuPosition()
public function setMenuPosition(?int $position): selfMenuSection::getNativeName()
public function getNativeName(): ?stringMenuSection::setNativeName()
public function setNativeName(?string $name): selfSetMenu 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(): ?arraySetMenu::getCourses()
public function getCourses(): arraySetMenu::setCourses()
public function setCourses(array|string|null $courses): self$coursesone per line when a string
SetMenu::getCoursesText()
public function getCoursesText(): stringSetMenu::setCoursesText()
public function setCoursesText(?string $text): selfSetMenu::getOnlyAt()
public function getOnlyAt(): ?MealServiceSetMenu::setOnlyAt()
public function setOnlyAt(?MealService $service): selfBase\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(): voidSession::getId()
public function getId(): ?intSession::getTable()
public function getTable(): TableSession::moveTo()
public function moveTo(Table $table): selfThe guests moved to another table: the bill follows them.
Session::getStatus()
public function getStatus(): SessionStatusSession::isOpen()
public function isOpen(): boolSession::getCovers()
public function getCovers(): ?intSession::setCovers()
public function setCovers(?int $covers): selfSession::getReservation()
public function getReservation(): ?ReservationSession::setReservation()
public function setReservation(?Reservation $reservation): selfSession::getTickets()
public function getTickets(): CollectionSession::addTicket()
public function addTicket(Ticket $ticket): selfSession::getBilledTickets()
public function getBilledTickets(): array- Returns
the rounds still counted on the bill (not refused nor cancelled)
Session::getTotal()
public function getTotal(): intCents, VAT included.
Session::getCurrency()
public function getCurrency(): stringSession::isWaiting()
public function isWaiting(): boolSome round still on its way from the kitchen.
Session::hasReady()
public function hasReady(): boolSession::getOpenedAt()
public function getOpenedAt(): \DateTimeImmutableSession::getWaiterCalledAt()
public function getWaiterCalledAt(): ?\DateTimeImmutableSession::callWaiter()
public function callWaiter(): selfSession::answerCall()
public function answerCall(): selfSession::getBillRequestedAt()
public function getBillRequestedAt(): ?\DateTimeImmutableSession::requestBill()
public function requestBill(): selfSession::closeTickets()
public function closeTickets(?\DateTimeImmutable $at = null): arrayThe 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): selfPaid: its open rounds closed (closeTickets()), the table is free for the next guests.
Session::getOrderReference()
public function getOrderReference(): ?stringSession::setOrderReference()
public function setOrderReference(?string $reference): selfSession::getSettledAt()
public function getSettledAt(): ?\DateTimeImmutableSession::getSettledWith()
public function getSettledWith(): ?stringSession::getSettledAmount()
public function getSettledAmount(): ?intSession::getUpdatedAt()
public function getUpdatedAt(): \DateTimeImmutableTicket 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(): voidTicket::__toString()
public function __toString(): stringTicket::getLabel()
public function getLabel(): string"Table 12 · 2", "Uber Eats #A1B2C", "À emporter #7"
Ticket::getId()
public function getId(): ?intTicket::getSession()
public function getSession(): ?SessionTicket::setSession()
public function setSession(?Session $session): selfTicket::getTable()
public function getTable(): ?TableTicket::setTable()
public function setTable(?Table $table): selfTicket::getChannel()
public function getChannel(): TicketChannelTicket::getPlatform()
public function getPlatform(): ?stringTicket::isFromPlatform()
public function isFromPlatform(): boolTicket::getExternalRef()
public function getExternalRef(): ?stringTicket::setExternalRef()
public function setExternalRef(?string $ref): selfTicket::getDisplayId()
public function getDisplayId(): ?stringTicket::setDisplayId()
public function setDisplayId(?string $displayId): selfTicket::getStatus()
public function getStatus(): TicketStatusTicket::getRound()
public function getRound(): intTicket::setRound()
public function setRound(int $round): selfTicket::getCustomerName()
public function getCustomerName(): ?stringTicket::setCustomerName()
public function setCustomerName(?string $name): selfTicket::getNote()
public function getNote(): ?stringTicket::setNote()
public function setNote(?string $note): selfTicket::getCurrency()
public function getCurrency(): stringTicket::setCurrency()
public function setCurrency(string $currency): selfTicket::moveTo()
public function moveTo(TicketStatus $to, ?\DateTimeImmutable $at = null): selfMoves 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(): selfThe one step forward.
@throws TransitionException at the end
Ticket::close()
public function close(TicketStatus $status, ?\DateTimeImmutable $at = null): selfClosed 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): selfAs the platform says it now is, without asking whether the pass would have gone that way.
Ticket::getLines()
public function getLines(): CollectionTicket::getLinesFor()
public function getLinesFor(?Station $station): arrayTicket::addLine()
public function addLine(TicketLine $line): selfTicket::getStations()
public function getStations(): array- Returns
the stations it needs, in their order
Ticket::count()
public function count(): intTicket::getTotal()
public function getTotal(): intCents, VAT included: what the platform says was paid, else the lines.
Ticket::getPaid()
public function getPaid(): ?intTicket::setPaid()
public function setPaid(?int $paid): selfTicket::getCreatedAt()
public function getCreatedAt(): \DateTimeImmutableTicket::setCreatedAt()
public function setCreatedAt(\DateTimeInterface $at): selfTicket::getAcceptBy()
public function getAcceptBy(): ?\DateTimeImmutableTicket::setAcceptBy()
public function setAcceptBy(?\DateTimeInterface $at): selfTicket::getPickupAt()
public function getPickupAt(): ?\DateTimeImmutableTicket::setPickupAt()
public function setPickupAt(?\DateTimeInterface $at): selfTicket::getAcceptedAt()
public function getAcceptedAt(): ?\DateTimeImmutableTicket::getReadyAt()
public function getReadyAt(): ?\DateTimeImmutableTicket::getServedAt()
public function getServedAt(): ?\DateTimeImmutableTicket::getUpdatedAt()
public function getUpdatedAt(): \DateTimeImmutableTicket::secondsToAccept()
public function secondsToAccept(?\DateTimeImmutable $now = null): ?intSeconds 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): selfTicketLine::getId()
public function getId(): ?intTicketLine::getTicket()
public function getTicket(): ?TicketTicketLine::setTicket()
public function setTicket(?Ticket $ticket): selfTicketLine::getDish()
public function getDish(): ?DishTicketLine::getName()
public function getName(): stringTicketLine::getQuantity()
public function getQuantity(): intTicketLine::getUnitPrice()
public function getUnitPrice(): intTicketLine::getTotal()
public function getTotal(): intTicketLine::getOptions()
public function getOptions(): arrayTicketLine::setOptions()
public function setOptions(array $options): selfTicketLine::getNote()
public function getNote(): ?stringTicketLine::setNote()
public function setNote(?string $note): selfTicketLine::getStation()
public function getStation(): StationTicketLine::setStation()
public function setStation(Station $station): selfBase\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(): ?arrayTakeHome::getNativeName()
public function getNativeName(): ?stringTakeHome::setNativeName()
public function setNativeName(?string $name): selfTakeHome::getIllustration()
public function getIllustration(): ?stringTakeHome::setIllustration()
public function setIllustration(?string $illustration): selfTakeHome::getAllergens()
public function getAllergens(): arrayTakeHome::setAllergens()
public function setAllergens(iterable $allergens): selfTakeHome::getAllergenCases()
public function getAllergenCases(): arrayTakeHome::getKeeping()
public function getKeeping(): KeepingTakeHome::setKeeping()
public function setKeeping(Keeping|string|null $keeping): selfTakeHome::getKeepingName()
public function getKeepingName(): stringTakeHome::setKeepingName()
public function setKeepingName(?string $keeping): selfTakeHome::isFrozen()
public function isFrozen(): boolTakeHome::isChilled()
public function isChilled(): boolKept cold - fresh or frozen: it leaves in an insulated bag, travels in a chilled parcel only.
TakeHome::getStorageTemperature()
public function getStorageTemperature(): intTakeHome::setStorageTemperature()
public function setStorageTemperature(?int $celsius): selfTakeHome::getShelfLife()
public function getShelfLife(): intTakeHome::setShelfLife()
public function setShelfLife(?int $days): selfTakeHome::getNetWeight()
public function getNetWeight(): ?intTakeHome::setNetWeight()
public function setNetWeight(?int $grams): selfTakeHome::getPortions()
public function getPortions(): intTakeHome::setPortions()
public function setPortions(?int $portions): selfTakeHome::getCookingTime()
public function getCookingTime(): ?intTakeHome::setCookingTime()
public function setCookingTime(?int $minutes): selfTakeHome::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$stepsby language, or a plain list
TakeHome::getCookingText()
public function getCookingText(): stringThe back office's field: the steps of the first language, one per line.
TakeHome::setCookingText()
public function setCookingText(?string $text): selfTakeHome::isParcel()
public function isParcel(): boolTakeHome::getParcel()
public function getParcel(): boolTakeHome::setParcel()
public function setParcel(?bool $parcel): selfTakeHome::getShopPosition()
public function getShopPosition(): intTakeHome::setShopPosition()
public function setShopPosition(?int $position): selfTakeHome::useBy()
public function useBy(\DateTimeImmutable $madeOn): \DateTimeImmutableIts use-by date, made on this day.
TakeHome::getWeight()
public function getWeight(): ?intGrams, for the parcel: its net weight (the marketplace's attribute otherwise).
TakeHome::isAvailable()
public function isAvailable(): boolBase\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(): stringKeeping 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(): intThe highest temperature it is kept at, in °C, when the dish says nothing else
Keeping::isCold()
public function isCold(): boolKept cold: it leaves in an insulated bag, travels in a chilled parcel only
Keeping::trans()
public function trans(): stringReservationStatus 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(): boolIt holds its tables (and counts against the service's covers).
ReservationStatus::isFinal()
public function isFinal(): boolReservationStatus::next()
public function next(): arrayWhat the pass may make of it.
@return list<self>
ReservationStatus::canBecome()
public function canBecome(self $to): boolReservationStatus::trans()
public function trans(): stringSessionStatus 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(): boolSessionStatus::trans()
public function trans(): stringStation 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(): stringTableShape 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(): stringTicketChannel 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(): stringTicketStatus 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(): arrayTicketStatus::canBecome()
public function canBecome(self $to): boolTicketStatus::forward()
public function forward(): ?selfThe one step forward the pass's main button takes; null at the end.
TicketStatus::isFinal()
public function isFinal(): boolTicketStatus::isOpen()
public function isOpen(): boolStill on the pass: not served, refused nor cancelled.
TicketStatus::column()
public function column(): ?stringThe pass's column.
TicketStatus::trans()
public function trans(): stringBase\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 $dishpublic 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 $reservationpublic readonly ?ReservationStatus $previouspublic readonly bool $fromPlatformTold 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 $ticketpublic readonly ?TicketStatus $frompublic readonly ?string $reasonWhy 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): voidQuickOrderListener::onDone()
public function onDone(QuickOrderDoneEvent $event): voidRevisionListener 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): voidRevisionListener::postFlush()
public function postFlush(PostFlushEventArgs $args): voidTakeawayListener 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): voidTakeawayListener::onTicket()
public function onTicket(TicketMovedEvent $event): voidBase\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): voidBookingType::configureOptions()
public function configureOptions(OptionsResolver $resolver): voidBookingType::getBlockPrefix()
public function getBlockPrefix(): stringTakeHomeOrderType 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): voidTakeHomeOrderType::configureOptions()
public function configureOptions(OptionsResolver $resolver): voidTakeHomeOrderType::getBlockPrefix()
public function getBlockPrefix(): stringBase\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 = nullpublic ?string $time = nullpublic ?int $covers = 2public ?string $name = nullpublic ?string $email = nullpublic ?string $phone = nullpublic ?string $notes = nullpublic ?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 $tablespublic array $joinsgroups of table ids, each among $tables
Floor::__construct()
public function __construct(public array $tables, public array $joins = [])$joinsgroups of table ids, each among $tables
Floor::table()
public function table(int $id): ?TableFloor::capacity()
public function capacity(): intHandOver 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 $modepublic readonly bool $availablepublic readonly array $dayspublic readonly ?string $reasonpublic readonly array $parametersthe 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 = [])$parametersthe 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 = nullpublic ?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 = 0public int $quantity = 1public 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 $daypublic string $timepublic MealService $servicepublic array $tablespublic 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(): \DateTimeImmutableSlot::tablesLabel()
public function tablesLabel(): stringTakeHomeOrder 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 = nullpublic ?string $address = nullpublic ?string $postcode = nullpublic ?string $city = nullpublic ?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(): stringFoodKeysSection::getFields()
public function getFields(): arrayMenuExport 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): MenuMenuExport::item()
public function item(Dish $dish, ?string $photoBase = null): ItemOrderTickets 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$acceptanceDelayseconds the platform waits for an answer (Capabilities::$acceptanceDelay)
$dishForthe menu's dish for a POS reference
OrderTickets::status()
public static function status(OrderStatus $status): ?TicketStatusOrderTickets::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 = 86400A 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(): arrayEvery platform the site declares, with its state.
PlatformHealth::of()
public function of(string $name): arrayPlatformHealth::failed()
public function failed(string $name, string $message): voidPlatformHealth::succeeded()
public function succeeded(string $name): voidPlatformSubscriber 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 = 15Minutes 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): voidPlatformSubscriber::onDish()
public function onDish(DishAvailabilityEvent $event): voidPlatformSubscriber::onReservation()
public function onReservation(ReservationChangedEvent $event): voidPlatforms 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(): arrayPlatforms::has()
public function has(string $name): boolPlatforms::get()
public function get(string $name): PlatformInterfacePlatforms::factoryOf()
public function factoryOf(string $name): ?stringThe 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): ?OrdersInterfacePlatforms::reservations()
public function reservations(string $name): ?ReservationsInterfacePlatforms::notifiable()
public function notifiable(string $name): ?NotifiableInterfacePlatforms::store()
public function store(string $name): ?StoreInterfacePlatforms::menu()
public function menu(string $name): ?MenuInterfacePlatforms::missing()
public function missing(string $name): arrayThe 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): boolPlatforms::typed()
public function typed(string $name): arrayThe 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|nullChecks 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): TicketAn 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): ReservationA 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(): arrayMealServiceRepository class
class MealServiceRepository extends ServiceEntityRepository MealServiceRepository.php:10
MealServiceRepository::__construct()
public function __construct(ManagerRegistry $registry)MealServiceRepository::ordered()
public function ordered(): arrayMealServiceRepository::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): ?MealServiceThe 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): ?ReservationReservationRepository::findOneByExternal()
public function findOneByExternal(string $source, string $ref): ?ReservationReservationRepository::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): intReservationRepository::revision()
public function revision(): intMicroseconds 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(): arraySessionRepository class
class SessionRepository extends ServiceEntityRepository SessionRepository.php:12
SessionRepository::__construct()
public function __construct(ManagerRegistry $registry)SessionRepository::openAt()
public function openAt(Table $table): ?SessionSessionRepository::openByTable()
public function openByTable(): array- Returns
table id => its open session
SessionRepository::revision()
public function revision(): intSessionRepository::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(): arrayTableRepository::findOneByToken()
public function findOneByToken(string $token): ?TableTableRepository::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): ?TakeHomeTicketRepository class
class TicketRepository extends ServiceEntityRepository TicketRepository.php:11
TicketRepository::__construct()
public function __construct(ManagerRegistry $registry)TicketRepository::findOneByExternal()
public function findOneByExternal(string $platform, string $ref): ?TicketTicketRepository::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(): intThe newest ticket waiting for an answer: the pass rings when it grows.
TicketRepository::countOpen()
public function countOpen(): intTicketRepository::revision()
public function revision(): intBase\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)$placesgateway => the restaurant's ID there
$ownersgateway => 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(): intRestaurantReviews::widget()
public function widget(Environment $twig, string $gateway, Place $place, ?int $limit = null): stringThe family's widget for one platform: its rating and latest reviews, their origin, date and link.
RestaurantReviews::latest()
public function latest(int $limit = 5): arrayThe latest reviews over every platform, newest first.
RestaurantReviews::unanswered()
public function unanswered(int $limit = 20): arrayThe 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(): intAvailability::today()
public function today(): \DateTimeImmutableThe restaurant's today, in its own time zone.
Availability::now()
public function now(): \DateTimeImmutableThe restaurant's wall-clock now.
Availability::lastDay()
public function lastDay(): \DateTimeImmutableAvailability::slots()
public function slots(\DateTimeInterface $day, int $covers, bool $online = true, ?Reservation $except = null): arrayEvery 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): arrayThe 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): ReservationTakes (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): ReservationThe 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 = [])$parcelenabled, ship_days (1 Monday … 7 Sunday), transit_days, margin_days, cutoff
ColdChain::options()
public function options(array $lines, ?string $postcode = null, ?\DateTimeImmutable $now = null): arrayEvery 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): voidThis 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): \DateTimeImmutableThe day a parcel that leaves on $shipped is delivered.
ColdChain::useBy()
public function useBy(array $lines, \DateTimeImmutable $madeOn): ?\DateTimeImmutableThe use-by date of a basket made on this day: its shortest.
ColdChain::travelling()
public function travelling(array $lines): arrayThose of these lines that may go in a chilled parcel: the dish travels, and keeps long enough.
ColdChain::deliversTo()
public function deliversTo(?string $postcode): boolFloorPlan 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): ?LayoutFloorPlan::floor()
public function floor(?\DateTimeInterface $day = null, ?MealService $service = null, ?array $rooms = null): Floor$roomsevery room when null
FloorPlan::drawing()
public function drawing(Room $room, ?Layout $layout): arrayThe 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(): ?ShippingMethodParcelCarrier::isConfigured()
public function isConfigured(): boolPass 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 = 45A 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): arrayEverything the screen draws.
Pass::state()
public function state(): arrayWhat 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): arrayA table as the floor shows it now.
$reservationsthe day's
Pass::move()
public function move(Ticket $ticket, string $action, ?string $reason = null): voidaccept, 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): voidThe 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): voidThe guests (and their bill, their reservation) moved to another table.
Pass::seat()
public function seat(Reservation $reservation): ?SessionSeat a reservation: its table's bill opened and tied to it.
Pass::answerCall()
public function answerCall(Session $session): voidPass::toggleOrdering()
public function toggleOrdering(Table $table): voidGuests may order from their phones at this table, or not any more.
Pass::stock()
public function stock(Dish $dish, bool $available): voidRun out ("rupture"), or back.
Pass::now()
public function now(): \DateTimeImmutableThe restaurant's wall-clock now.
Pass::rooms()
public function rooms(): arrayReservations 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): ReservationTaken 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): ReservationThe 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): ReservationMoved 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): voidCancelled by the guest (the link) or by the staff.
Reservations::move()
public function move(Reservation $reservation, ReservationStatus $to, bool $fromPlatform = false): voidThe pass's steps: confirm or refuse a request, seat, finish, absent.
- Throws
TransitionException
Reservations::changeable()
public function changeable(Reservation $reservation): boolStill time for the guest to change or cancel it online.
Reservations::calendarEntry()
public function calendarEntry(Reservation $reservation, string $title, ?string $location = null): CalendarEntryReservations::ics()
public function ics(Reservation $reservation, string $title, ?string $location = null): stringRevision 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(): intRevision::bump()
public function bump(): intSeating 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): arrayThe times a party of $covers can be seated at in $service on $day.
$holdingthe reservations holding tables that day
$noticeminutes from $now before the first time offered
Seating::fit()
public function fit(int $covers, Floor $floor, array $busy, bool $strict = true): ?arrayThe 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.
$busytable id => busy
Seating::busy()
public function busy(array $holding, string $from, string $until): arrayThe tables held between those two wall-clock times ("Y-m-d H:i").
Seating::coversTaken()
public function coversTaken(MealService $service, array $holding): intTableOrders 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): ?SessionThe 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): TicketA 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): voidTableOrders::requestBill()
public function requestBill(Session $session): voidTableOrders::state()
public function state(Session $session): arrayWhat a guest's phone shows: the table's rounds and where each stands, the total.
TableOrders::progress()
public function progress(Session $session): arrayTablePayments 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(): boolTablePayments::isOffered()
public function isOffered(Session $session): boolWhether this bill can be paid from a phone now.
TablePayments::lines()
public function lines(Session $session): ?arrayThe 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): ?SessionAn 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(): boolTakeHomeOrders::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): ?ProductThe 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): ?TicketTakeawayTickets::fromPickup()
public function fromPickup(Pickup $pickup): ?TicketThe 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): voidA 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