user6827096
user6827096

Reputation: 1394

What kind of controller naming format Sylius use in yaml config files?

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

Upvotes: 1

Views: 72

Answers (1)

Steffen Brem
Steffen Brem

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

Related Questions