{% extends 'base.html.twig' %}

{% block title %}MenuItem{% endblock %}

{% block body %}
    <h1>MenuItem</h1>

    <table class="table">
        <tbody>
            <tr>
                <th>Id</th>
                <td>{{ menu_item.id }}</td>
            </tr>
            <tr>
                <th>Name</th>
                <td>{{ menu_item.name }}</td>
            </tr>
            {% if(menu_item.aliasOf) %}
            <tr>
                <th>Alias of</th>
                <td>{{ menu_item.aliasOf.name }}</td>
            </tr>
            {% endif %}
            {% if(menu_item.aliases|length  > 0) %}
            <tr>
                <th>Aliases</th>
                <td>
                    <ul>
                    {% for alias in menu_item.aliases %}
                        <li>{{ alias.name }}</li>
                    {% endfor %}
                    </ul>
                </td>
            </tr>
            {% endif %}
        </tbody>
    </table>

    <a href="{{ path('app_food_vendor_show', { 'id': menu_item.foodVendor.id}) }}">back to list</a>

    <a href="{{ path('app_menu_item_edit', {'id': menu_item.id}) }}">edit</a>

    {{ include('menu_item/_delete_form.html.twig') }}
{% endblock %}