So you will have to create a new controller first. This controller will be responsible for making decisions about how you will cook your Pizza.
Change often leads to confusion, so it is better to make few changes in the Symfony directory structure and just jump to create a new controller.
Create a new controller class inside the directory <Project-Root>/src/Acme/DemoBundle/Controller
. Name it CookingController.php
. There are a few rules to follow:
By default, you should create a controller with the suffix
Controller
in the nameEach controller should extend a class
Controller
that is defined in the namespaceSymfony\Bundle\FrameworkBundle\Controller\Controller
The controller should be defined in the namespace
Acme\DemoBundle\Controller
Since you will be required to route the methods as actions, you will need to use namespace
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
.You need to define a route in a configuration file (a file...