Skip to content

Commit

Permalink
Use new array syntax and make a few minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bocharsky-bw authored Sep 23, 2016
1 parent 463f9db commit 7686e13
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ to creating a page?
#. *Create a controller*: The method below the route - ``numberAction()`` - is called
the *controller*: this is a function where *you* build the page and ultimately
return a ``Response`` object. You'll learn more about :doc:`controllers </controller>`
in their own section, including how to return JSON responses;
in their own section, including how to return JSON responses.

The Web Debug Toolbar: Debugging Dream
--------------------------------------
Expand Down Expand Up @@ -133,9 +133,9 @@ variable so we can render that::
{
$number = mt_rand(0, 100);

return $this->render('lucky/number.html.twig', array(
'number' => $number
));
return $this->render('lucky/number.html.twig', [
'number' => $number,
]);
}
}

Expand Down Expand Up @@ -184,7 +184,7 @@ So what about the other directories in the project?

``var/``
This is where automatically-created files are stored, like cache files
(``var/cache/``) and logs (``var/logs/``).
(``var/cache/``), logs (``var/logs/``) and (``var/sessions/``).

``vendor/``
Third-party (i.e. "vendor") libraries live here! These are downloaded via the `Composer`_
Expand All @@ -209,11 +209,11 @@ Bundles are registered in your ``app/AppKernel.php`` file (a rare PHP file in th
{
public function registerBundles()
{
$bundles = array(
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
// ...
);
];
// ...

return $bundles;
Expand Down

0 comments on commit 7686e13

Please sign in to comment.