pull/17/head
kevin.modejar 6 months ago
parent fbf88794e1
commit 05e5cb3ffc

@ -2,7 +2,7 @@
"require": { "require": {
"twig/twig": "^3.0", "twig/twig": "^3.0",
"ext-pdo": "*", "ext-pdo": "*",
"altorouter/altorouter": "^2.0" "altorouter/altorouter": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

14
composer.lock generated

@ -4,7 +4,6 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
<<<<<<< HEAD
"content-hash": "68804b2111cb6b8bf6edf66cb2b4669c", "content-hash": "68804b2111cb6b8bf6edf66cb2b4669c",
"packages": [ "packages": [
{ {
@ -68,11 +67,6 @@
"time": "2020-03-09T08:34:59+00:00" "time": "2020-03-09T08:34:59+00:00"
}, },
{ {
=======
"content-hash": "e4bbfb6f07dd88c6288177f48b9cb54c",
"packages": [
{
>>>>>>> 8f986a30433c4424563cac3b838b80c8e6a12f1d
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.5.0", "version": "v3.5.0",
"source": { "source": {
@ -457,20 +451,12 @@
"packages-dev": [], "packages-dev": [],
"aliases": [], "aliases": [],
"minimum-stability": "stable", "minimum-stability": "stable",
<<<<<<< HEAD
"stability-flags": [],
=======
"stability-flags": {}, "stability-flags": {},
>>>>>>> 8f986a30433c4424563cac3b838b80c8e6a12f1d
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"ext-pdo": "*" "ext-pdo": "*"
}, },
<<<<<<< HEAD
"platform-dev": [],
=======
"platform-dev": {}, "platform-dev": {},
>>>>>>> 8f986a30433c4424563cac3b838b80c8e6a12f1d
"plugin-api-version": "2.6.0" "plugin-api-version": "2.6.0"
} }

@ -1,9 +1,13 @@
<?php <?php
require_once __DIR__ . '/../vendor/autoload.php';
$loader = new Twig_Loader_Filesystem('templates'); // appele avec index.php ne pas metre si controleur fonctionnel
$twig = new Twig_Environment($loader, array( 'cache' => false )); require __DIR__ . '/../vendor/autoload.php';
$value = 'Salva';
$loader = new \Twig\Loader\FilesystemLoader('templates');
$twig = new \Twig\Environment($loader, [
'cache' => false,
]);
//
echo $twig->render('quote.html', array( echo $twig->render('quote.html', array(
'srcImg' => "../default.jpg", 'srcImg' => "../default.jpg",
@ -11,6 +15,15 @@
'quoteContent' => "je test la page", 'quoteContent' => "je test la page",
'sourceName' => "une source", 'sourceName' => "une source",
'dateSortie' => "1999", 'dateSortie' => "1999",
'nbLike' => "0" 'nbLike' => "0",
)); 'comment'=> array(
array(
'user'=>'toto',
'content'=>'12345674fkjgvhgtfoidshfziutgfos'
),
array(
'user'=> 'tata',
'content'=>'azertyuiopqsdfghjklmwxcvbn'
)
)));
?> ?>

@ -25,7 +25,12 @@
</div> </div>
</div> </div>
<div class="Comment_Container"> <div class="Comment_Container">
{% if comment|length > 0%} <div>
{% for com in comment %}
<p class="userCom">{{ com.user }}</p>
<p class="com">{{ com.content }}</p>
{% endfor %} </div>
{% endif %}
</div> </div>
</body> </body>
</html> </html>
Loading…
Cancel
Save