{% extends 'base.html.twig'%} {% block body %} {# movieForTwig #} {# dump(movieForTwig) #} {# App\Entity\Movie {#248 ▼ -id: 1 -title: "The Jungle Book" -duration: 90 -rating: 4.0 -summary: "sDGHGDH" -synopsis: """ QSHJSERQGDSQDS
{% include "front/partials/_favorites.html.twig" with {'movieIDForPartial': movieForTwig.id} %} {# #} {{ movieForTwig.type.name }}

{{ movieForTwig.title }}

{{ movieForTwig.duration }} min

{% for genre in movieForTwig.genres %} {{ genre.name }} {% endfor %}

{{ movieForTwig.synopsis }}

{% include 'front/partials/_stars.html.twig' with {'ratingStars': movieForTwig.rating} %} {# on conditionne la partie saison que pour les série #} {% if movieForTwig.type.name == 'série' %}

{{ movieForTwig.seasons|length }} {{ movieForTwig.seasons|length > 1 ? 'Saisons' : 'Saison' }}

    {% for season in movieForTwig.seasons %}
  • Saison {{ season.number }}({{ season.nbEpisodes }} épisodes)
  • {% endfor %}
{% endif %}
Avec (Sort Twig)
{% set sortedCastings = movieForTwig.castings|sort((casting1, casting2) => casting1.creditorder <=> casting2.creditorder) %} {% for casting in sortedCastings %} {{ casting.person.firstname }} {{ casting.person.lastname }} ({{ casting.role }}) ({{ casting.creditOrder }})
{% endfor %}
Avec (From BDD)
{% for casting in allCastingFromBDD %} {{ casting.person.firstname }} {{ casting.person.lastname }} ({{ casting.role }}) ({{ casting.creditOrder }})
{% endfor %}
Pays
{{ movieForTwig.country }}
Année
{{ movieForTwig.releaseDate|date("Y") }}
{# allReviewFromBDD #} {% for review in allReviewFromBDD %}
Critiques de {{ review.username }}
{% include 'front/partials/_stars.html.twig' with {'ratingStars': review.rating} %}

{{ review.content}}

Vu le {{ review.watchedAt|date('d-m-Y') }}

{{ review.username }} a regardé {{ movieForTwig.title }} le {{ review.watchedAt|date('m/d/Y')}}:
{{ review.content}}
{% for reaction in review.reactions %} {{ reaction }} {% endfor %}
{% else %}

Ce film n'a pas encore de critique

{% endfor %}
{% endblock %}