This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>{% block title %}Zombie Process{% endblock %}</title> | |
</head> | |
<body> | |
<h1>{% block main_title %}{% endblock %}</h1> | |
{% block content %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Symfony 4</title> | |
</head> | |
<body> | |
<h1>Framework Symfony 4</h1> | |
<p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Questo è un commento #} | |
{# Esempio N.1 #} | |
Lista degli impiegati:<br> | |
{% for employee in employees %} | |
{{ employee.name }} | |
{% else %} | |
Nessun impiegato trovato | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html.twig" %} | |
{% block title %}pizzeria Zombie Process{% endblock %} | |
{% block content %}Ciao, sono {{ name }}! La mia pizza preferita è la {{ pizza }}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
{% block title %}{% endblock %} | |
</title> | |
</head> | |
<body> | |
{% include "menu.html.twig" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ...previous content | |
/** | |
* @Route("/random/{max}", name="random") | |
*/ | |
public function random($max = 10) | |
{ | |
$randomNumber = random_int(0, $max); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>pizzeria Zombie Process</title> | |
</head> | |
<body> | |
Ciao, sono {{ name }}! La mia pizza preferita è la {{ pizza }} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// previous content | |
/** | |
* @Route("/pizza", name="pizza") | |
*/ | |
public function pizza() | |
{ | |
return $this->render('Default/pizza.html.twig', [ | |
'name' => 'Antonio', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// /src/Controller/DefaultController.php | |
namespace App\Controller; | |
use Symfony\Component\Routing\Annotation\Route; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Symfony\Component\Routing\Annotation\Route; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
class DefaultController extends Controller | |
{ | |
/** |
NewerOlder