Reputation: 1394
f.e. lets compare two routing yaml files:
ShopBundle/Resources/config/routing/product.yml
ShopBundle/Resources/config/routing/taxon.yml
both have _controller atribute:
_controller: sylius.controller.product:showAction
and
_controller: sylius.controller.taxon:showAction
and both match same controller: ResourceBundle/Controller/ResourceController.php#L167
What kind of controller naming format Sylius use in yaml config files? Why it not looks like Bundle:Controller:action
?
How to find this controller other than hunting it in the project code?
Upvotes: 1
Views: 72
Reputation: 1768
Sylius uses controllers as services (see: http://symfony.com/doc/current/controller/service.html). To easily find the related code to that service I suggest you to install the Symfony2 plugin for PHPStorm, you can find it here: https://plugins.jetbrains.com/plugin/7219?pr=idea.
The plugin uses the build container in your cache folder. So you should make sure that symfony has properly build your definitions once. So try running php app/console cache:clear
or simply run your application.
You should use Ctrl + click
or Cmd + click
on for example service id's, Twig template names etc.
Upvotes: 1