Class: Menu

Menu


The menu available in your restaurants. Container class (behaves like a List).

You need to have at least one MenuEntry in your menu, but people appreciate to be able to pick between more than one.
Source:
Menu.js

Methods


add(name, ingredients, price)

Adds an entry to your menu. Max 300 entries are allowed.
Parameters:
Name Type Description
name String The name of your meal
ingredients Array A list of ingredients. Available is: SALAD, TOMATO, ONION, BREAD, LAMB_MEAT, CHICKEN_MEAT, BEEF_MEAT, CABBAGE, SPICES, GARLIC_SAUCE
price Number The price.
Source:
Menu.js

remove(name)

Removes an entry from your menu
Parameters:
Name Type Description
name String The name of one of your meals you'd like to remove
Source:
Menu.js

iterator()

Java-like iterator to loop over all ApplicationProfiles within this call.
Source:
Menu.js
Returns:
An iterator to loop
Type
Iterator

each(forEachElement)

JavaScript-like callback to loop over all MenuEntry within your menu.
Parameters:
Name Type Description
forEachElement function Will be called for each available MenuEntry. Needs to have one parameter.
Source:
Menu.js

get(index)

Returns a MenuEntry object at the index
Parameters:
Name Type Description
index Number index number to get
Source:
Menu.js
Returns:
the element at the position index
Type
MenuEntry

size()

Returns the number of menus you've defined
Source:
Menu.js
Returns:
number of menus available
Type
Number