Skip to content

Commit

Permalink
Symfony twig template for usage 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tesshsu committed Mar 22, 2018
1 parent 878845e commit cb227a0
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 432 deletions.
4 changes: 0 additions & 4 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions .idea/the_spacebar.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

300 changes: 168 additions & 132 deletions .idea/workspace.xml

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions bin/phpunit

This file was deleted.

1 change: 0 additions & 1 deletion composer.json
Expand Up @@ -16,7 +16,6 @@
"symfony/yaml": "^4.0"
},
"require-dev": {
"symfony/debug-pack": "^1.0",
"symfony/dotenv": "^4.0",
"symfony/profiler-pack": "^1.0"
},
Expand Down
214 changes: 1 addition & 213 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion config/bundles.php
Expand Up @@ -7,5 +7,4 @@
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
];
16 changes: 0 additions & 16 deletions config/packages/dev/easy_log_handler.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions config/services_test.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions src/Controller/ArticleController.php
Expand Up @@ -38,7 +38,7 @@ public function show($slug)
*/
public function toggleArticleStar($slug, LoggerInterface $logger)
{
$logger->notice('so show the loggerInterface');
$logger->info('this is been rating');
return new JsonResponse(['stars' => rand(5, 100)]);
}
}
}
23 changes: 23 additions & 0 deletions src/Controller/MenuController.php
@@ -0,0 +1,23 @@
<?php
namespace App\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;


class MenuController extends AbstractController
{
/**
* @Route("/about", name="app_aboutpage")
*/
public function aboutpage()
{
$headings = [
'burger1' => 'I ate a normal rock once. It did NOT taste like bacon!',
'burger2' => 'Woohoo! I\'m going on an all-asteroid diet!',
'burger3' => 'I like bacon too! Buy some from my site! bakinsomebacon.com',
];
return $this->render('article/aboutpage.html.twig', array(
'headings' => $headings,
));
}
}

0 comments on commit cb227a0

Please sign in to comment.